How to call a file

Chris Sprinkles sprinkles.chris at gmail.com
Sat May 10 01:13:48 EDT 2008


I'm still having trouble with calling a text file and I know its so simple
here is the code
----------------------------------------------------
work = open('C:\Documents and Settings\Administrator\My
Documents\Chris\Python\Python\work.txt', 'r')
for line in work.txt:
    print line
-----------------------------------------------------
Ok so I know that the directory is right cause I'm not a complete idiot but
I keep getting an error? What am I missing here?
-Chris-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080510/f2e05cb7/attachment.html>


More information about the Python-list mailing list