Dealing with errors in interactive subprocess running python interpreter that freeze the process
Terry Reedy
tjreedy at udel.edu
Thu Aug 2 23:56:16 EDT 2018
On 8/2/2018 3:52 PM, cseberino at gmail.com wrote:
>
>> subprocess is not meant for interaction through the pipes. That is why,
>> I have been told, IDLE uses a socket for interaction. Multiprocess is
>> apparently better suited for interaction without resorting to a socket.
>
> So use normal socket on localhost for this? Don't you still need subprocess
> to launch the interpreter in a separate process?
Yes. And you need to replace sys.stdxxx with file-like objects that
redirect streams from and to the socket. And it is not 100% reliable,
just 99.99??% reliableC
--
Terry Jan Reedy
More information about the Python-list
mailing list