1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00
maloja/maloja

23 lines
444 B
Plaintext
Raw Normal View History

2018-12-06 15:36:42 +03:00
#!/usr/bin/env python
2018-12-08 02:01:44 +03:00
neededmodules = [
"bottle",
"waitress"
]
toinstall = []
2018-12-06 15:36:42 +03:00
2018-12-08 02:01:44 +03:00
for m in neededmodules:
try:
exec("import " + m) #I'm sorry
except:
toinstall.append(m)
if toinstall != []:
print("The following python modules need to be installed:")
for m in toinstall:
print("\t" + m)
else:
import subprocess
subprocess.Popen(["python","server.py"],stdout=subprocess.DEVNULL,stderr=subprocess.DEVNULL)
print("Maloja started!")