Storing lines from a text file
bradfordh at gmail.com
bradfordh at gmail.com
Sun Jan 29 19:08:01 EST 2006
More information about the Python-list mailing list
Sun Jan 29 19:08:01 EST 2006
- Previous message (by thread): Storing lines from a text file
- Next message (by thread): Storing lines from a text file
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I keep getting an error when I try to use what you said Mr. McDonald. I
think I've got something wrong, but take a look if you can.
log = open('C:\log_0.txt')
lines = log.getlines()
for line in lines:
print line
When I debug it the error I get is the following:
AttributeError: 'file' object has no attribute 'getlines'
- Previous message (by thread): Storing lines from a text file
- Next message (by thread): Storing lines from a text file
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list