Getting stdout from other processes

Diez B. Roggisch deets at nospam.web.de
Fri Feb 22 10:45:38 EST 2008


Matthias Vogelgesang schrieb:
> Hello,
> as I found out, it is possible to get the output of other programs
> using os.popen() and read from it. However this method is blocking for
> server processes and programs that don't stop immediately. Has anyone
> an idea how to get the output of such programs?

Use either the module select to dispatch in case of arriving input on 
one of several filedescriptors, or a thread to poll the data

Diez



More information about the Python-list mailing list