Reading pipes in Python

Rene Pijlman reply.in.the.newsgroup at my.address.is.invalid
Sat Dec 6 12:42:35 EST 2003


Jeroen van der Ham:
>f=open('/tmp/myfifo','r')
>while 1:
>    print f.readline()

This loop is endless, so don't complain to us that it doesn't end :-)

>what can be done to make it work?

f=open('ff','r')
while 1:
    li = f.readline()
    if not li: break
    print li,

-- 
René Pijlman




More information about the Python-list mailing list