-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpylaunch.py
41 lines (39 loc) · 1.32 KB
/
pylaunch.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
import os
status = 0
print("Launched by pylaunch")
try:
status = int(input("1.Python Version\n2.Python3 Version(Suggested for Ubuntu)\n"))
except ValueError:
print("An error occurred, invalid input.\nlauncher shutting down...")
while status != 0:
if status == 1:
os.system("python pywrbs.py")
try:
status = int(input("Press 0 to exit or 1 to keep playing:\n"))
if status == 1:
status = 1
else:
print("launcher shutting down...")
except ValueError:
print("An error occurred, invalid input...\nlauncher shutting down...")
status = 0
except KeyboardInterrupt:
print("launcher shutting down...")
status = 0
elif status == 2:
os.system("python3 pywrbs.py")
try:
status = int(input("Press 0 to exit or 1 to keep playing:\n"))
if status == 1:
status = 2
else:
print("launcher shutting down...")
except ValueError:
print("An error occurred, invalid input...\nlauncher shutting down...")
status = 0
except KeyboardInterrupt:
print("\nlauncher shutting down...")
status = 0
else:
status = 0
print("launcher shutting down...")