Hi all,
I'm using IDLE (and python 3) to try and open a (.doc) file with this script:
my_file = open('/home/jack/Documents/Python/PFMgmt')
open_file = my_file.read()
print(open_file)
... and it doesn't work. I get the message (in the Python shell):
File "/home/jack/Documents/Python/py files/File mgt practice.py", line 3, in <module>
my_file = open('/home/jack/Documents/Python/PFMgmt')
IOError: [Errno 2] No such file or directory: '/home/jack/Documents/Python/PFMgmt'
I know the script works as I can use it to open a text file in /etc, no problem.
I've checked in the absolute file path in the terminal, it looks to be correct. I know the file is there because I put it there, I can see it there in terminal and GUI, it is bloody well there!
Can anybody please tell me why this isn't working!?
Thanks very much for any advice.
Jack.
Bookmarks