
On Fri, 28 Mar 2014 16:58:25 -0400 Terry Reedy <tjreedy@udel.edu> wrote:
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:
Thank you for writing this. As I explained in response to Josiah, Idle communicates with a python interpreter subprocess through a socket. Since making the connection is not dependable, I would like to replace the socket with the pipes. http://bugs.python.org/issue18823
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.
Why don't you use multiprocessing or concurrent.futures? They have everything you need for continuous conversation between processes. Regards Antoine.