From bcfc4fc163093d250fa60daa7ca98221bb56fcdd Mon Sep 17 00:00:00 2001 From: cecilkorik Date: Fri, 5 May 2017 12:46:33 -0600 Subject: [PATCH] fixed colors on windows (by removing them, haha) --HG-- branch : stargen --- stargen.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stargen.py b/stargen.py index 09e9f60..0337d31 100644 --- a/stargen.py +++ b/stargen.py @@ -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()])