[issue1191964] asynchronous Subprocess
Ross Lagerwall
report at bugs.python.org
Wed May 23 13:05:56 CEST 2012
Ross Lagerwall <rosslagerwall at gmail.com> added the comment:
> Personally, I would factor out the code for Popen.communicate() in to a > Communicator class which wraps a Popen object and has a method
>
> communicate(input, timeout=None) -> (bytes_written, output, error)
How would this differ from the normal communicate()?
It seems like there are two different ideas for why people want an "asynchronous subprocess":
One is that they want to use communicate() but not be limited by memory issues.
I think a good API for this case is an asyncore style API or like the one from the patch in issue1260171.
Another use case is for an expect-type interface where you read and write based on a timeout or some kind of delimiter like a newline.
These should probably be addressed independently.
See also issue10482.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1191964>
_______________________________________
More information about the Python-bugs-list
mailing list