-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.py
More file actions
54 lines (47 loc) · 1.28 KB
/
Copy pathutils.py
File metadata and controls
54 lines (47 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
from sys import platform
from colorama import Fore
def is_windows():
return platform == "win32"
def is_osx():
return platform == "darwin"
def is_linux():
return platform in ("linux", "linux2")
# Converts color strings to colorama colors
def parse_color(color):
match color:
case "light_blue":
return Fore.LIGHTBLUE_EX
case "blue":
return Fore.BLUE
case "light_green":
return Fore.LIGHTGREEN_EX
case "green":
return Fore.GREEN
case "light_red":
return Fore.LIGHTRED_EX
case "red":
return Fore.RED
case "pink":
return Fore.LIGHTMAGENTA_EX
case "magenta":
return Fore.MAGENTA
case "light_yellow":
return Fore.LIGHTYELLOW_EX
case "yellow":
return Fore.YELLOW
case "light_cyan":
return Fore.LIGHTCYAN_EX
case "cyan":
return Fore.CYAN
case "white":
return Fore.LIGHTWHITE_EX
case "light_gray":
return Fore.WHITE
case "gray":
return Fore.LIGHTBLACK_EX
case "black":
return Fore.BLACK
case "default":
return Fore.RESET
case _:
return None