This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author djp1012878
Recipients djp1012878
Date 2021-11-05.00:42:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1636072966.86.0.9507982269.issue45719@roundup.psfhosted.org>
In-reply-to
Content
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()
History
Date User Action Args
2021-11-05 00:42:47djp1012878setrecipients: + djp1012878
2021-11-05 00:42:46djp1012878setmessageid: <1636072966.86.0.9507982269.issue45719@roundup.psfhosted.org>
2021-11-05 00:42:46djp1012878linkissue45719 messages
2021-11-05 00:42:46djp1012878create