Made logging flush stdout
This commit is contained in:
parent
d5c8d1de1d
commit
72f47bbea0
1 changed files with 2 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue