Checking for end of a file

CB nospam at email.com
Thu Jul 20 15:26:32 EDT 2000


If I'm iterating through a text file, reading one line at a time within a
while statement, how do I check for the end of file.  I tried while
filename.eof and filename.eof() but to no avail?

Colin





More information about the Python-list mailing list