I'm using Git Bash to run my Python scripts on Windows. I noticed that the console doesn't print while my scripts are running. All the strings are printed just when the scripts finish. I read that is a buffer and line break issue. How can I fix it?
Asked
Active
Viewed 1,597 times
2 Answers
3
I solve this including sys.stdout.flush()
after each print()
.

bodruk
- 3,242
- 8
- 34
- 52
-
I'm using freshly installed Windows 10, git bash and `Python 3.5.1 :: Anaconda 2.4.1 (64-bit)` and I don't see anything printed even after flushing or causing an error. Works fine at `cmd`, any suggestions on how to get it to work in Mingw64? `python -u` doesn't help either, I'm not seeing even `>>>` at line beginning. – NikoNyrh Jan 14 '16 at 12:50