How does os.popen works ?

logistix logistix at zworg.com
Sun Feb 9 17:38:25 EST 2003


Rouk <cuny at iie.cnam.fr> wrote in message news:<b245vo$5sj$1 at norfair.nerim.net>...
> 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 ?

I think popen2, popen3, or popen4 does what you're looking for.




More information about the Python-list mailing list