check EOF
Richard Chamberlain
richard_chamberlain at ntlworld.com
Mon Apr 10 06:51:50 EDT 2000
Python returns an empty string as EOF so something like this is probably
easiest:
file=open("myfile","r")
for line in file.readlines():
# do something with line
you could do something with while loops as well but this is probably
shorter.
"Soundwave" <maybe at lucky.com> wrote in message
news:8cs6g4$rje$1 at porthos.nl.uu.net...
> how can I check EOF in python ???
>
>
More information about the Python-list
mailing list