I would recommend trying to use the subprocess module. I don't believe it existed when I first designed this part of IDLE. However I would not use communicate(), which is meant as a simplified API for sending one input string and waiting for the subprocess to exit. There is a low-level API to let you send multiple strings and receive output back as it becomes available. (You may have to create threads to read stdout and stderr.)
On Fri, Aug 23, 2013 at 8:46 AM, Terry Reedy <[email protected]> wrote: > On 8/23/2013 1:43 AM, Ronald Oussoren wrote: > >> >> On 23 Aug, 2013, at 3:54, Andrew Svetlov <[email protected]> >> wrote: >> > > Probably the proper solution would use pipes instead of sockets. >>> >> >> I agree that using pipes (or even socketpair() sockets) would be cleaner >> than the current solution, but would that work on Windows? The current >> solution has the advantage of working on Linux, Windows and OSX without >> having separate implementations for some of the platforms. >> > > I presume that subprocess.Popen.communicate 'works' on Windows, as the > docs say nothing otherwise. But I do not know if there are (still) latency > issues. > > > -- > Terry Jan Reedy > > ______________________________**_________________ > IDLE-dev mailing list > [email protected] > http://mail.python.org/**mailman/listinfo/idle-dev<http://mail.python.org/mailman/listinfo/idle-dev> > -- --Guido van Rossum (python.org/~guido)
_______________________________________________ IDLE-dev mailing list [email protected] http://mail.python.org/mailman/listinfo/idle-dev
