managing stdout and stderr neatly while doing parallel processing

Ganesan R rganesan at myrealbox.com
Wed Aug 6 14:11:37 CEST 2003


>>>>> "Alex" == Alex Martelli <aleax at aleax.it> writes:

> Grant Edwards wrote:
>    ...
>> 3) use a pseudo-terminal (pty) so that your child process is running in a
>> more "natural" environment, and you'll get both stderr and stdout that
>> way too.  Don't know if there's handy Python "pty" module or not...

> Well, there's http://www.python.org/doc/current/lib/module-pty.html , but
> I'm not sure if it counts as "handy"?

Dealing with the raw pty module is not fun. Use pexpect instead (See
http://pexpect.sf.net) - it's built on top of pty module and is very easy to
use.

Ganesan


-- 
Ganesan R (rganesan at debian dot org) | http://www.debian.org/~rganesan/
1024D/5D8C12EA, fingerprint F361 84F1 8D82 32E7 1832  6798 15E0 02BA 5D8C 12EA




More information about the Python-list mailing list