Comment 7 for bug 625551

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 625551] Re: selftest --parallel=subprocess ignores child stderr pipes

On Fri, May 27, 2011 at 10:27 PM, Andrew Bennetts
<email address hidden> wrote:
>> > Unfortunately the only easy way to improve the situation would involve
>> > adding threads to subunit, and I'm not sure I hate myself enough to be
>> > able to write that code :P
>>
>> Why? the parser and the get-data functions are already separated -
>> subunit was written with twisted use in mind.
>
> Because subprocess doesn't expose a way to read incrementally from both
> stdout and stderr.   The best you can do with it is use .communicate()
> to feed a canned stdin and get back a fully read stdout and stderr once
> the process exits.

Sure it does - select. The file objects can be selected on and
incrementally iterated. Or asyncore.

-Rob