Opening File Object

Ray Holt mrholtsr at sbcglobal.net
Mon Dec 21 11:48:33 EST 2009


I use the following code:
fileobject = open("e:\\Ray Holts Documents\\Word Documents\\1850 Warren MS
Jenkins", 'y')
line = fileobject.readline()
 
I get the following error message:Traceback (most recent call last):
  File "C:/Python26/Reading_and_Writing_Files", line 5, in <module>
    fileobject = open("E:\\Ray Holts Documents\Word Documents\\1850 Warren
MS Jenkins", 'r')
IOError: [Errno 2] No such file or directory: 'E:\\Ray Holts Documents\\Word
Documents\\1850 Warren MS Jenkins'

I know the file exists because I opened it in MS Word. Can someone help me?
Thanks, Ray Holt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20091221/c0feb353/attachment.html>


More information about the Python-list mailing list