[issue21080] asyncio.subprocess: connect pipes of two programs

STINNER Victor report at bugs.python.org
Fri Mar 28 00:47:54 CET 2014


STINNER Victor added the comment:

> Oh, I see. Given that it is possible to do using event loop methods, why don't you write up a complete implementation and then propose to add that to the asyncio.subprocess module?

I don't know that a whole new implementation is needed. I guess that a
simpler change can be done on SubprocessStreamProtocol to ask to not
consume the pipe (don't attach a StreamReader to the pipe transport).

I still want to use streams at the end, so use the "high-level API". Example:
---
ls = yield from create_subprocess_exec("ls", stdout=subprocess.PIPE)
grep = yield from create_subprocess_exec("grep", "-v", "-F", ".old",
stdin=ls.stdin, stdout=subprocess.PIPE)
stdout, _ = yield from grep.communicate()
---

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21080>
_______________________________________


More information about the Python-bugs-list mailing list