Reading pipes in Python

Jeroen van der Ham jeroen_ at
Sat Dec 6 20:53:38 CET 2003

On Sat, 06 Dec 2003 18:42:35 +0100, Rene Pijlman
< at> wrote:
>This loop is endless, so don't complain to us that it doesn't end :-)
>>what can be done to make it work?
>while 1:
>    li = f.readline()
>    if not li: break
>    print li,

This works, but only for a single line.

The idea is that the pipe takes the place of a log of an application
so that the script can do something because something is written to
the log.


More information about the Python-list mailing list