I have a Windows 10 python script that I usually run using the following command:-
python -u my_python_application.py
The -u
option is used to force stdin, stdout and stderr to be totally unbuffered. This gives my application an instantaneous feel, and without it there is a delay where data is logged after the operation occurs.
I am now trying to create an executable through Pyinstaller. So far everything is working as expected and I can generate an executable which I can run without any major issues. However, the generated executable does not have the unbuffered stdio option, and as a result my application is not as instantaneous/responsive as its non-executable form. So my question is: Is there anyway to force stdio to be totally unbuffered when using Pyinstaller?
I have found similar unanswered posts here:-
- Pyinstaller unbuffered runtime option
- Pyinstaller unbuffered stdio
- Pyinstaller examine handling of u option
I am using Python v2.7.13 and Pyinstaller v3.6 on a Windows 10 machine.