-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmontsy.py
44 lines (41 loc) · 1.12 KB
/
montsy.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
#!/usr/bin/python3
#
# written by @author ZyzonixDev
# published by ZyzonixDevelopments
# -
# date | 18/03/2021
# python-v | 3.5.3
# -
# file | montsy.py
# project | MontSy
# project-v | 0.9.6
#
# this file allows smooth loading of MontSy
from datetime import datetime
import sys
import threading
import time
import itertools
# loading animation
def loadingAnimation():
for c in itertools.cycle(['|', '/', '-', '\\']):
# checking if import is finished
if loaded:
# cancels for loop
break
sys.stdout.write('\r[' + str(datetime.now().strftime("%H:%M:%S")) + '] loading libraries ' + c)
sys.stdout.flush()
time.sleep(0.1)
# import finished indicator
loaded = False
print("\n[" + str(datetime.now().strftime("%H:%M:%S")) + "] running " + "\033[91m" + '\033[1m' + "MontSy" + '\033[0m' + " (system monitoring and overview) application \n")
# starting loading animation
thread = threading.Thread(target=loadingAnimation)
thread.start()
# importing core
from core import Core
loaded = True
# updating loaded-var in thread
thread.join()
# executing the core
Core()