aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjaseg <jaseg@jaseg.net>2014-12-09 23:37:13 +0100
committerjaseg <jaseg@jaseg.net>2014-12-09 23:37:13 +0100
commit72f47bbea03f270794753b34c0c8b42dd3fa3699 (patch)
tree0a9f9e09f39ec25a2de76e8281aef2ee2b7af4a7
parentd5c8d1de1dd8a360a76d6ff66766e96f70cb50c2 (diff)
downloadmatelight-72f47bbea03f270794753b34c0c8b42dd3fa3699.tar.gz
matelight-72f47bbea03f270794753b34c0c8b42dd3fa3699.tar.bz2
matelight-72f47bbea03f270794753b34c0c8b42dd3fa3699.zip
Made logging flush stdout
-rwxr-xr-xhost/server.py2
1 files changed, 2 insertions, 0 deletions
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: