[Python-Dev] Status of PEP 3145 - Asynchronous I/O for subprocess.popen
Victor Stinner
victor.stinner at gmail.com
Fri Mar 28 22:24:45 CET 2014
Le 28 mars 2014 21:59, "Terry Reedy" <tjreedy at udel.edu> a écrit :
>
> On 3/28/2014 6:20 AM, Victor Stinner wrote:
>
>> Full example of asynchronous communication with a subprocess (the
>> python interactive interpreter) using asyncio high-level API:
>
> However, the code below creates a subprocess for one command and one
response, which can apparently be done now with subprocess.communicate.
What I and others need is a continuing (non-blocking) conversion with 1 and
only 1 subprocess (see my response to Josiah), and that is much more
difficult. So this code does not do what he claims his will do.
I tried to write the shortest example showing how to read and send data and
how to make the call blocking. It's different to communicate() because
write occurs after the first read.
It should be quite easy to enhance my example to execute more commands.
Victor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140328/e5d4fc17/attachment.html>
More information about the Python-Dev
mailing list