You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running Python scripts which can take a long time to finish running, due to that during the Python execution, print out to the screen the script stages so the users won't need to wait until the end without knowing what's going on. when I'm running vi Script-Server only when Python execution ends I get the complete STDOUT printed to the screen.
I found an ugly workaround which instead of printing out with print(), I'm printing using input() with Timeout of 1 sec before continuing before the user will able to prompt in, and then it prints out the messages in "real-time"
is this a bug or by design?
The text was updated successfully, but these errors were encountered:
Hey, as far as i understand, this is how python buffering works
Try running `python -u your_script.py`
Alonel <[email protected]> schrieb am Sa., 10. Okt. 2020, 00:22:
I'm running Python scripts which can take a long time to finish running,
due to that during the Python execution, print out to the screen the script
stages so the users won't need to wait until the end without knowing what's
going on. when I'm running vi Script-Server only when Python execution ends
I get the complete STDOUT printed to the screen.
I found an ugly workaround which instead of printing out with print(), I'm
printing using input() with Timeout of 1 sec before continuing before the
user will able to prompt in, and then it prints out the messages in
"real-time"
is this a bug or by design?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#349>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJXPJKH3L7H4M6FXIRMLEDSJ6ELXANCNFSM4SKSN6BA>
.
I stumbled upon this inconvenience during testing again and decided to disable python buffering for called scripts (using PYTHONUNBUFFERED env variable). Hopefully, it won't break existing functionality and no one relies on buffering
I'm running Python scripts which can take a long time to finish running, due to that during the Python execution, print out to the screen the script stages so the users won't need to wait until the end without knowing what's going on. when I'm running vi Script-Server only when Python execution ends I get the complete STDOUT printed to the screen.
I found an ugly workaround which instead of printing out with print(), I'm printing using input() with Timeout of 1 sec before continuing before the user will able to prompt in, and then it prints out the messages in "real-time"
is this a bug or by design?
The text was updated successfully, but these errors were encountered: