Skip to content

Commit 14d78bb

Browse files
committed
Simplify start.py
1 parent c8c1823 commit 14d78bb

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

start.py

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,7 @@
1313
# @author PieMC Team
1414
# @link http://www.PieMC-Dev.github.io/
1515

16-
import subprocess
17-
def check_python_version():
18-
try:
19-
# Attempt to run the 'python' command and check if it's available
20-
subprocess.check_output('python --version', shell=True)
21-
return 'python'
22-
except subprocess.CalledProcessError:
23-
try:
24-
# Attempt to run the 'python3' command and check if it's available
25-
subprocess.check_output('python3 --version', shell=True)
26-
return 'python3'
27-
except subprocess.CalledProcessError:
28-
raise Exception("Neither 'python' nor 'python3' found in your system.")
16+
from piemc import main
2917

30-
31-
selected_python_command = check_python_version()
32-
print(f"launching with the command: {selected_python_command}")
33-
subprocess.call(['python', '-m', 'piemc'])
18+
if __name__ == "__main__":
19+
main()

0 commit comments

Comments
 (0)