new to Python.
Even when doing a simple write to file I get an error
simple code
text = "Sample text."
saveFile = open("file.txt", "w")
saveFile.write(text)
saveFile.close()
error OSError: [Errno 9] Bad file descriptor
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Tony\Documents\PythonCourse\App1\tester.py", line 4, in <module>
saveFile.close()
OSError: [Errno 9] Bad file descriptor
doing this without a close does not give an error but does not write to the file.
I'm lost as to what to try next