running "python -i" in subprocess shows no prompt

Grant Edwards grant.b.edwards at gmail.com
Mon Mar 18 13:21:51 EDT 2019


On 2019-03-18, <finnkochinski at keemail.me> <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.  The problem
> is that the prompt ">>>" asking for then next input is neither sent
> to stdout nor to stderr.  The commands sent to stdin aren't echoed
> to stdout either.

Perhaps the prompt/echo is sent to stdin?

If not connected to a tty, it may not issue prompts and echo commands.
Many command line utilities modify their behavior depending on whether
they're connected to a tty or not.

-- 
Grant Edwards               grant.b.edwards        Yow! I'm young ... I'm
                                  at               HEALTHY ... I can HIKE
                              gmail.com            THRU CAPT GROGAN'S LUMBAR
                                                   REGIONS!




More information about the Python-list mailing list