382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
|
""", re.X)
# wrapper for all print statements
def __print__(*args):
if "debug" in conf and conf.debug:
print(" ".join([str(a) for a in args]))
# error colorization
dbg = type('obj', (object,), {
"ERR": r"[31m[ERR][0m", # red ERROR
"INIT": r"[31m[INIT][0m", # red INIT ERROR
|
|
|
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
|
""", re.X)
# wrapper for all print statements
def __print__(*args):
if "debug" in conf and conf.debug or args[0] == dbg.ERR:
print(" ".join([str(a) for a in args]))
# error colorization
dbg = type('obj', (object,), {
"ERR": r"[31m[ERR][0m", # red ERROR
"INIT": r"[31m[INIT][0m", # red INIT ERROR
|