removing colors when in windows
This commit is contained in:
parent
9b88055b54
commit
6174a6cb51
|
@ -42,11 +42,16 @@ in this code
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
from string import join
|
from string import join
|
||||||
|
import os
|
||||||
|
|
||||||
import types
|
import types
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
colornames = ['none', 'black', 'red', 'green', 'brown', 'blue', 'magenta',
|
||||||
|
'cyan', 'light_gray', 'dark_gray', 'bright_red', 'bright_green', 'yellow',
|
||||||
|
'bright_blue', 'purple', 'bright_cyan', 'white']
|
||||||
|
|
||||||
color_none = chr(27) + "[0m"
|
color_none = chr(27) + "[0m"
|
||||||
color_black = chr(27) + "[30m"
|
color_black = chr(27) + "[30m"
|
||||||
color_red = chr(27) + "[31m"
|
color_red = chr(27) + "[31m"
|
||||||
|
@ -65,7 +70,10 @@ color_purple = chr(27) + "[35;1m"
|
||||||
color_bright_cyan = chr(27) + "[36;1m"
|
color_bright_cyan = chr(27) + "[36;1m"
|
||||||
color_white = chr(27) + "[37;1m"
|
color_white = chr(27) + "[37;1m"
|
||||||
|
|
||||||
|
if os.name == 'nt':
|
||||||
|
for colorname in colornames:
|
||||||
|
name = 'color_' + colorname
|
||||||
|
name = ''
|
||||||
"""
|
"""
|
||||||
Define your flags in yor modules like this:
|
Define your flags in yor modules like this:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue