Spawning console and piping the stdout into it

Leonhard Weber lweberk at gmail.com
Mon May 31 16:56:00 EDT 2010


Hi,

I'm stuck at a puzzle for quite some time.

Situation: (Linux environment)
I have a script that is invoked from an application (running my script as
part of embedded python). I have no power over that application, only supply
the script it executes. Now for development reasons I want that script to
spawn a console and show me the output through there. Though there is the
ugly way of writing to file and tailing it, it would be great if someone
could come up with a cleaner version.

The approach I've been taking is trying to start a child with the subprocess
module and pipe the sys.stdoout into the stdin of the child... hummmm. No
success so far.


Thanks,
~lwk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100531/3985f632/attachment.html>


More information about the Python-list mailing list