eof?

Dietmar Lang dietmar at wohnheim.fh-wedel.de
Tue Aug 14 18:02:33 EDT 2001


Hi,

> There isn't one AFAIK, at least not along the lines you're probably
> thinking of.  The closest is
> 
> while 1:
>     line = fh.readline()
>     if line == '': break

Even simpler:

while 1:
    line = file.readline()
    if not line: break
    ## Process the line here

Kudos, Dietmar



More information about the Python-list mailing list