-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtwo.py
60 lines (53 loc) · 2.76 KB
/
two.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import sys
import time
from colorit import *
init_colorit
def progressBar():
animation = ["[□□□□□□□□□□]","[■□□□□□□□□□]","[■■□□□□□□□□]", "[■■■□□□□□□□]", "[■■■■□□□□□□]", "[■■■■■□□□□□]", "[■■■■■■□□□□]", "[■■■■■■■□□□]", "[■■■■■■■■□□]", "[■■■■■■■■■□]"]
progress_anim = 0
save_anim = animation[progress_anim % len(animation)]
percent = 0
while True:
for i in range(10):
percent += 1
sys.stdout.write( '\33[91m' + "\r Loading... " + save_anim + f" {percent}%" + '\33[0m' + '\33[0m')
sys.stdout.flush()
time.sleep(0.015)
progress_anim += 1
save_anim = animation[progress_anim % len(animation)]
if percent == 100:
sys.stdout.write( '\33[96m'+ "\r Load completed... [■■■■■■■■■■] 100%" + '\33[0m')
break
def Quit():
animation = ["[□□□□□□□□□□]","[■□□□□□□□□□]","[■■□□□□□□□□]", "[■■■□□□□□□□]", "[■■■■□□□□□□]", "[■■■■■□□□□□]", "[■■■■■■□□□□]", "[■■■■■■■□□□]", "[■■■■■■■■□□]", "[■■■■■■■■■□]"]
progress_anim = 0
save_anim = animation[progress_anim % len(animation)]
percent = 0
while True:
for i in range(10):
percent += 1
sys.stdout.write( '\33[33m' + "\r Quiting... " + save_anim + f" {percent}%" + '\33[0m' + '\33[0m')
sys.stdout.flush()
time.sleep(0.015)
progress_anim += 1
save_anim = animation[progress_anim % len(animation)]
if percent == 100:
sys.stdout.write( '\33[96m'+ "\r Thank You :) " + '\33[0m')
break
def Start():
animation = ["[□□□□□□□□□□]","[■□□□□□□□□□]","[■■□□□□□□□□]", "[■■■□□□□□□□]", "[■■■■□□□□□□]", "[■■■■■□□□□□]", "[■■■■■■□□□□]", "[■■■■■■■□□□]", "[■■■■■■■■□□]", "[■■■■■■■■■□]"]
progress_anim = 0
save_anim = animation[progress_anim % len(animation)]
percent = 0
while True:
for i in range(10):
percent += 1
sys.stdout.write(color("\r Starting... " + save_anim + f" {percent}%", (255,0,0)))
sys.stdout.flush()
time.sleep(0.015)
progress_anim += 1
save_anim = animation[progress_anim % len(animation)]
if percent == 100:
sys.stdout.write(color("\r Starting in 3..2..1.... " , Colors.green))
time.sleep(3)
break