End of file?
Steve
nospam at nopes
Sat Jan 3 11:34:36 EST 2004
Rene Pijlman wrote:
> 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
>
Thanks :)
More information about the Python-list
mailing list