Made logging flush stdout

This commit is contained in:
jaseg 2014-12-09 23:37:13 +01:00
parent d5c8d1de1d
commit 72f47bbea0

View file

@ -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: