1
0

Improve text gui. Disable print_error when text gui is used.

This commit is contained in:
thomasv
2012-10-29 16:22:53 +01:00
parent cdb52c30d2
commit 5e28ccd09d
5 changed files with 68 additions and 54 deletions

View File

@@ -1,7 +1,14 @@
import os, sys
import platform
is_verbose = True
def set_verbosity(b):
global is_verbose
is_verbose = b
def print_error(*args):
if not is_verbose: return
# Stringify args
args = [str(item) for item in args]
sys.stderr.write(" ".join(args) + "\n")