Message405761
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() |
|
Date |
User |
Action |
Args |
2021-11-05 00:42:47 | djp1012878 | set | recipients:
+ djp1012878 |
2021-11-05 00:42:46 | djp1012878 | set | messageid: <1636072966.86.0.9507982269.issue45719@roundup.psfhosted.org> |
2021-11-05 00:42:46 | djp1012878 | link | issue45719 messages |
2021-11-05 00:42:46 | djp1012878 | create | |
|