summaryrefslogtreecommitdiffstats
path: root/pym/output.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/output.py')
-rw-r--r--pym/output.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/pym/output.py b/pym/output.py
index 4ff7ce5f7..62ec975fe 100644
--- a/pym/output.py
+++ b/pym/output.py
@@ -210,15 +210,18 @@ def notitles():
def nocolor():
"turn off colorization"
+ global havecolor
havecolor=0
- for x in codes.keys():
- codes[x]=""
def resetColor():
return codes["reset"]
def colorize(color_key, text):
- return codes[color_key] + text + codes["reset"]
+ global havecolor
+ if havecolor:
+ return codes[color_key] + text + codes["reset"]
+ else:
+ return text
compat_functions_colors = ["bold","white","teal","turquoise","darkteal",
"fuscia","fuchsia","purple","blue","darkblue","green","darkgreen","yellow",