import subprocess import os app_file = "app.py" app_full_path = os.path.join(os.path.dirname(__file__), app_file) subprocess.run(app_full_path, shell=True)