check EOF

Richard Chamberlain richard_chamberlain at
Mon Apr 10 06:51:50 EDT 2000

Python returns an empty string as EOF so something like this is probably

for line in file.readlines():
    # do something with line

you could do something with while loops as well but this is probably

"Soundwave" <maybe at> wrote in message
news:8cs6g4$rje$1 at
> how can I check EOF in python ???

More information about the Python-list mailing list