colorama fixes

This commit is contained in:
William Minchin 2014-01-03 10:42:32 -07:00
parent 24147a25af
commit 57785117ab

View file

@ -10,6 +10,7 @@ try: import simplejson as json
except ImportError: import json
if "win32" in sys.platform:
import colorama
colorama.init()
import re
import tempfile
import subprocess
@ -141,7 +142,5 @@ def get_text_from_editor(config, template=""):
def colorize(string):
"""Returns the string wrapped in cyan ANSI escape"""
if "win32" in sys.platform:
return colorama.Fore.CYAN + string + colorama.Fore.RESET
return u"\033[36m{}\033[39m".format(string)