How does os.popen works ?
Rouk
cuny at iie.cnam.fr
Sat Feb 8 19:05:12 EST 2003
Rene Pijlman wrote:
> Pipes are typically buffered. See the description of the bufsiz
> paramtere in section 6.1.2 of the Python Library Reference, and
> section 6.8.2. "Flow Control Issues".
>
> With a pipe you shoud expect to receive data only when the other
> process has written "enough" data to the pipe. This may take a
> while and may indeed happen only when the other process
> terminates.
>
> Perhaps you should consider other models for interprocess
> communication, such as sockets. For advice from this group you
> would have to tell us a little more about your application and
> requirements.
I though that when setting the third parameter of popen to 0, the output
would be unbuffered...
I only want to get the output from a command, and display it after i have
parsed it, to extract some info from it.
I can't use socket, because i can't modify the other program i'm running.
Bad luck, isn't it ?
More information about the Python-list
mailing list