file open fails.

Atul. atulskulkarni at gmail.com
Tue Mar 24 17:46:08 EDT 2009


Hi I am using IDLE on Windows Vista and I have a small code.

title = 'C:\Thesis\refined_title.txt'
file = open(title)

I get the following error from Python.


    file = open(title)
IOError: [Errno 22] invalid mode ('r') or filename: 'C:\\Thesis
\refined_title.txt'

Now, I can not understand the problem here I have all the permissions
set for the folder, file as well. I can not understand why would it
happen. Is it known on Windows Vista or am I missing something really
simple and stupid? Please help.

Regards,
Atul.



More information about the Python-list mailing list