-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathutils.py
More file actions
29 lines (22 loc) · 1.18 KB
/
Copy pathutils.py
File metadata and controls
29 lines (22 loc) · 1.18 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
import os
import time
from colorama import Fore, Style
INTRO_TITLE = r"""
__ __ __ ______ ______ ______ ______ __ __ __ ______
/\ "-.\ \ /\ \ /\__ _\ /\___ \ /\ __ \ /\ __ \ /\ \/\ \ /\ \ /\___ \
\ \ \-. \ \ \ \ \/_/\ \/ \/_/ /__ \ \ __ \ \ \ \/\_\ \ \ \_\ \ \ \ \ \/_/ /__
\ \_\\"\_\ \ \_\ \ \_\ /\_____\ \ \_\ \_\ \ \___\_\ \ \_____\ \ \_\ /\_____\
\/_/ \/_/ \/_/ \/_/ \/_____/ \/_/\/_/ \/___/_/ \/_____/ \/_/ \/_____/
"""
def cprint(text, fcolor, bcolor='', style=Style.RESET_ALL):
print(f'{fcolor}{bcolor}{text}{style}')
time.sleep(0.5)
def rainbow(text):
colors = [Fore.RED, Fore.LIGHTYELLOW_EX, Fore.LIGHTGREEN_EX, Fore.LIGHTCYAN_EX, Fore.BLUE, Fore.MAGENTA]
out = ""
current_color = 0
for letter in text:
out = out + colors[current_color] + letter
if letter != " ":
current_color = (current_color + 1) % len(colors)
print(out)