Skip to content

Commit 1d2ec45

Browse files
authored
no color for windows shell (#22)
1 parent 5343601 commit 1d2ec45

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

lymbo/color.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
RED = "\033[31m"
2-
GREEN = "\033[32m"
3-
YELLOW = "\033[33m"
4-
RESET = "\033[0m"
1+
import os
2+
3+
if os.name == "nt":
4+
RED = ""
5+
GREEN = ""
6+
YELLOW = ""
7+
RESET = ""
8+
else:
9+
RED = "\033[31m"
10+
GREEN = "\033[32m"
11+
YELLOW = "\033[33m"
12+
RESET = "\033[0m"

0 commit comments

Comments
 (0)