Commit 6f9dff08 authored by Dan Pascu's avatar Dan Pascu

Open stdout/stderr in unbuffered mode when frozen

parent d254ec96
...@@ -61,7 +61,7 @@ from blink.util import QSingleton, run_in_gui_thread ...@@ -61,7 +61,7 @@ from blink.util import QSingleton, run_in_gui_thread
if hasattr(sys, 'frozen'): if hasattr(sys, 'frozen'):
output = sys.stdout output = sys.stdout
makedirs(ApplicationData.get('logs')) makedirs(ApplicationData.get('logs'))
sys.stdout = sys.stderr = open(ApplicationData.get('logs/output.log'), 'a') sys.stdout = sys.stderr = open(ApplicationData.get('logs/output.log'), 'a', 0)
sys.stdout.write(output.getvalue()) sys.stdout.write(output.getvalue())
output.close() output.close()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment