-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.py
More file actions
28 lines (23 loc) · 740 Bytes
/
Copy pathutils.py
File metadata and controls
28 lines (23 loc) · 740 Bytes
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
# Shared utility functions and classes.
class Colors:
"""A simple class for adding color to terminal output."""
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
@staticmethod
def print_fail(message):
print(f"{Colors.FAIL}{message}{Colors.ENDC}")
@staticmethod
def print_warning(message):
print(f"{Colors.WARNING}{message}{Colors.ENDC}")
@staticmethod
def print_header(message):
print(f"\n{Colors.HEADER}{Colors.BOLD}{message}{Colors.ENDC}")
@staticmethod
def print_info(message):
print(f"{Colors.OKBLUE}{message}{Colors.ENDC}")