EOF

Carlos Eberhardt ceberhardt at itradar.com
Fri Jul 7 15:42:16 EDT 2000


Not sure if it fits what you're doing, but one way would be
f = open("file")
while 1:
    line = f.readline()
    if not line:
        break

'Course, I'm new at this, so that might be a really awful way to do it, but
it's worked for me. :)

"fae" <fae at sis.it> wrote in message news:396623EE.211B14E9 at sis.it...
> Sorry,
>    how can I test if I reached the end of file ?
>
> thanks ,
>    Leonardo.
>





More information about the Python-list mailing list