When debugging with gdb in vscode, the stuff I print when executing a script in
the text editor does not show up in the terminal. It does work when I flush
explicitly though using `print(..., flush=True)`. This is quite annoying.
The solution is to always flush `stdout` and `stderr` automatically when running
a script. This is done using the CPython API, as just using
`fflush(stdout/stderr)` did not solve the issue.
Pull Request: https://projects.blender.org/blender/blender/pulls/136632