Getting stdout from other processes
Matthias Vogelgesang
matthias.vogelgesang at gmail.com
Sat Feb 23 09:43:59 EST 2008
Hi,
Miki wrote:
> The current "official" module to use is subprocess (pipe =
> Popen([client], stdout=PIPE))
> However if the client is sending data, reading from the pipe.stdout
> will block the server.
> If you *need* to wait, then you can use pipe.wait(), otherwise do as
> Diez suggested and have a thread
> read the client output and propagate it to the main loop (maybe using
> Queue.Queue)
Thanks both of you for your explanations. In fact, it did the trick.
--
Matthias
More information about the Python-list
mailing list