Monitoring the output of an external program

Vladimir Rusinov vladimir at greenmice.info
Thu Dec 13 03:01:41 EST 2007


On 12/13/07, Caleb Marcus <caleb.marcus at gmail.com> wrote:
>
>  I'm writing something that has to invoke an external program, and every
> time the external program prints something, update a UI. How would I go
> about doing this?
>

Use sys.popen or pexpect module.
With pexpect you can even use single thread.

-- 
Vladimir Rusinov
GreenMice Solutions: IT-решения на базе Linux
http://greenmice.info/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20071213/efa8ae44/attachment.html>


More information about the Python-list mailing list