How To Open A File In Python 3
I want to actually open it not just read it. I tried to do something like this: x = open('filename', 'r') abc = x.read() x.close() The above code just read the file, it did not ac
Solution 1:
open
creates a stream of data associated with the file. It does not initiate a file viewing software.
os.startfile('path/to/file.ext') # opens file in respective program
Post a Comment for "How To Open A File In Python 3"