-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextras.py
More file actions
34 lines (30 loc) · 764 Bytes
/
extras.py
File metadata and controls
34 lines (30 loc) · 764 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
29
30
31
32
33
34
from colorama.ansi import Fore
from colours import print_with_color
import sys
import time
from os import system, name
def decor(func):
def wrap():
print_with_color("[=======================================]", color=Fore.CYAN)
func()
print_with_color("[=======================================]", color=Fore.CYAN)
return wrap
def load_a():
for i in 'Encrypting....':
sys.stdout.write(i)
sys.stdout.flush()
time.sleep(0.3)
print('\n')
def load_b():
for i in 'Decrypting....':
sys.stdout.write(i)
sys.stdout.flush()
time.sleep(0.3)
print('\n')
def clear():
# Windows
if name == 'nt':
system('cls')
# Mac and Linux
else:
system('clear')