Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 19
    python -u <script.py> worked (forced flushed, no buffering) for me without having to modify script. Commented Nov 10, 2021 at 19:19
  • 2
    Note that the behavior is famously broken within IDEs. For example, PyCharm works correctly in the debug console, but not in the run console. You may need to isolate that the problem exists in a regular terminal. Commented Dec 31, 2021 at 23:49