-
Notifications
You must be signed in to change notification settings - Fork 0
/
color_lib.py
46 lines (25 loc) · 1.3 KB
/
color_lib.py
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
#Code is written by ÖZER TANRISEVER
#Credit : https://www.linkedin.com/in/ozer-tanrisever/
from termcolor import colored, cprint
def print_warning(warning_text = 'Warning => Things might go wrong!' ):
text = '\n___________________________________________________\n'
print(colored(text, 'yellow', attrs = ['bold']))
print(colored(warning_text,'yellow', attrs = ['bold']))
text = '___________________________________________________\n'
print(colored(text, 'yellow', attrs = ['bold']))
def print_success(success_text = 'Process Succesful!'):
text = '\n___________________________________________________\n'
print(colored(text, 'green', attrs = ['bold']))
print(colored(success_text, 'green', attrs = ['bold']))
text = '___________________________________________________\n'
print(colored(text, 'green', attrs = ['bold']))
def print_error(error_text = 'An error occured!'):
text = '\n___________________________________________________\n'
print(colored(text, 'red', attrs = ['bold']))
print(colored(error_text, 'red', attrs = ['bold']))
text = '___________________________________________________\n'
print(colored(text, 'red', attrs = ['bold']))
#EXAMPLE USAGE
#print_error()
#print_warning()
#print_success()