Capture Standard Output Of A Python Program As It Happens
I'm trying to write a C# program that captures the standard output in a python program. My problem is that all of the output comes after the program has executed rather than when i
Solution 1:
I know this is old but running python with -u (unbuffered) seems to be what you were after
Solution 2:
You need to flush the output buffer.
import sys
sys.stdout.flush()
See this question: How to flush output of Python print?
Solution 3:
Good (Capture standard output of a python program as it happens) Em console is NEED: import sys sys.stdout.flush()
Post a Comment for "Capture Standard Output Of A Python Program As It Happens"