Separating child's stderr and stdout output

63 views
Skip to first unread message

Ofir Cohen

unread,
Dec 6, 2014, 3:34:16 PM12/6/14
to winpe...@googlegroups.com
Hi,
Is there any way to getting stdout and stderr separately from a spawned child?

For the run() method in pexpect's documentation (http://pexpect.sourceforge.net/pexpect.html#-run),
the following is stated:
"STDERR is included in output."

And per the winpexpect's homepage statement, "modules are exactly the same except for winspawn",
so I suspect they are the same in this regard too, meaning they are fused together.

I'm looking for something like the following
(stdout, stderr, exitstatus) = run ('dir c:/', timeout=my_timeout withexitstatus=1)

Thanks,
Ofir Cohen
Reply all
Reply to author
Forward
0 new messages