From 72f47bbea03f270794753b34c0c8b42dd3fa3699 Mon Sep 17 00:00:00 2001 From: jaseg Date: Tue, 9 Dec 2014 23:37:13 +0100 Subject: Made logging flush stdout --- host/server.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'host') diff --git a/host/server.py b/host/server.py index 7efca5e..2b42855 100755 --- a/host/server.py +++ b/host/server.py @@ -10,6 +10,7 @@ import itertools import threading import random import os +import sys from ctypes import * @@ -64,6 +65,7 @@ def printframe(fb): def log(*args): printlock.acquire() print(strftime('\x1B[93m[%m-%d %H:%M:%S]\x1B[0m'), ' '.join(str(arg) for arg in args), '\x1B[0m') + sys.stdout.flush() printlock.release() class TextRenderer: -- cgit