小智 6
我在 Windows10 上使用 MINGW64,并且python -u适用于我。例如,
python -u foo.py
Run Code Online (Sandbox Code Playgroud)
从python --help:
Run Code Online (Sandbox Code Playgroud)-u : unbuffered binary stdout and stderr; also PYTHONUNBUFFERED=x see man page for details on internal buffering relating to '-u'