Using this code:
data = open("data.py")
for i, line in enumerate(data):
if i == 7:
data.write("test")
I get the following error and I don't know how to fix it.
Traceback (most recent call last):
File "H:\py\Projects\osuGatcha\main.py", line 61, in <module>
data.write("test")
io.UnsupportedOperation: not writable
source https://stackoverflow.com/questions/69728401/io-unsupportedoperation-not-writable-cant-write-to-py-files
Comments
Post a Comment