Anybody can help on this?
bosahv at netscapenospam.net
Mon Feb 25 10:24:16 CET 2002
Thanks from the lurkers :)
"Jeff Shannon" <jeff at ccvcorp.com> wrote in message
news:3C768944.59BDD67E at ccvcorp.com...
> husam wrote:
> > >>> passout,passin=os.popen2("/home/husam/profit_1/profit")
> > # Also tried calling this with "popen2.popen2()" no go.
> > ....
> > >>> passin.read()
> > # Here it hangs, the only way to stop it is by pressing: ctrl+c
> Yes, just to make it explicit, this will block until the pipe closes,
> the external program terminates. This can be a long time, depending on
> external program. :)
> This can be avoided by reading single lines (which blocks until a full
> is available), or by specifying a number of bytes to read (which blocks
> until that many bytes are available). I think there is also an optional
> timeout, but it's been a while since I poked around with popen*() ...
> (I see that you already found a solution, but I wanted to post this for
> benefit of anyone else who might be following along...)
> Jeff Shannon
> Credit International
More information about the Python-list