End of file?

Rene Pijlman reply.in.the.newsgroup at my.address.is.invalid
Sat Jan 3 11:34:31 CET 2004


Steve:
>I'm having trouble finding out if output from a pipe has finished (i.e. 
>I can't find tell if there's a EOF in output.readlines()). How do I do 
>this? Because readlines() can return empty lines and I can't simply 
>check if the line is empty.

You don't get an EOF from readlines().

"readlines([sizehint]) 

Read until EOF using readline() and return a list containing the lines
thus read."

http://www.python.org/doc/current/lib/bltin-file-objects.html

-- 
René Pijlman



More information about the Python-list mailing list