mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
colorama fixes
This commit is contained in:
parent
24147a25af
commit
57785117ab
1 changed files with 1 additions and 2 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue