New submission from DJ PJs <djp1012...@gmail.com>:

Keeping writing to a subprocess, and then flushing it to get the stdout works 
for other interpreters, but not python's.

Simplified Example of what I mean:

from subprocess import PIPE, Popen, CREATE_NEW_CONSOLE, run

subProcess = Popen("Python", stdin=PIPE, stdout=PIPE, text=True, 
universal_newlines=True)

subProcess.stdin.write('Print("HelloWorld")')

subProcess.stdin.flush()

for line in subProcess.stdout:
    print(">>> " + str(line.rstrip()))
    subProcess.stdout.flush()

----------
components: Library (Lib)
files: example.py
messages: 405761
nosy: djp1012878
priority: normal
severity: normal
status: open
title: SubProcess stdin.flush freezes when running python interpreter
type: behavior
versions: Python 3.10
Added file: https://bugs.python.org/file50425/example.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45719>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to