[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

running "python -i" in subprocess shows no prompt

On 3/18/2019 9:10 AM, finnkochinski at keemail.me wrote:
> I try to start a separate python subprocess using the attached code. This example should catch all stdout and stderr output from the launched subprocess and send commands to its stdin.

Subprocess is not intended for interaction.  My attempts to use the 
subprocess pipes failed like yours did.

IDLE makes a socket connection to the execution subprocess, but using 
multiprocessing may be better for you.  This was the answer I got when I 
asked the same question you did.  (IDLE was written before multiprocess, 
and I may experiment with switching.)

Terry Jan Reedy