fixed colors on windows (by removing them, haha)
--HG-- branch : stargen
This commit is contained in:
parent
f0c3c10b6d
commit
bcfc4fc163
1 changed files with 4 additions and 0 deletions
|
@ -3,6 +3,10 @@ import math
|
|||
import os, sys
|
||||
|
||||
def color(str, col, bright=0, reset=1):
|
||||
if os.name != "posix":
|
||||
"color not supported, am too lazy"
|
||||
return str
|
||||
|
||||
ansi = {'R': '31', 'X': '30', 'G': '32', 'Y': '33', 'B': '34', 'M': '35', 'C': '36', 'W': '37'}
|
||||
b = '1' if bright else '0'
|
||||
a = '\x1b[%s;%sm' % (b, ansi[col.upper()])
|
||||
|
|
Loading…
Add table
Reference in a new issue