18 lines
567 B
Python
Executable File
18 lines
567 B
Python
Executable File
#!/usr/bin/env python3
|
||
|
||
import os
|
||
import sys
|
||
import subprocess
|
||
|
||
os.chdir(os.path.dirname(__file__))
|
||
|
||
# Zielpfad zur venv-Python
|
||
venv_python = os.path.join("app", ".venv", "Scripts", "python.exe") if os.name == "nt" else os.path.join("app", ".venv", "bin", "python")
|
||
|
||
# Verwende venv-Python, wenn vorhanden – sonst system-Python für initialen Aufbau
|
||
python_exec = venv_python if os.path.exists(venv_python) else sys.executable
|
||
|
||
# Starte main.py
|
||
main_script = os.path.abspath(os.path.join("app", "main.py"))
|
||
subprocess.run([python_exec, main_script] + sys.argv[1:])
|