mirror of
https://github.com/Radiquum/YAMPD.git
synced 2025-05-20 07:39:35 +05:00
20 lines
No EOL
569 B
Python
20 lines
No EOL
569 B
Python
import subprocess
|
|
import time
|
|
import os
|
|
|
|
if __name__ == "__main__":
|
|
|
|
environment = os.environ.copy()
|
|
environment["is_dev"] = "True"
|
|
|
|
gui_proc = subprocess.Popen(["bun", "run", "dev"], cwd="./gui", env=environment, shell = True)
|
|
app_proc = subprocess.Popen(["python", "main.py"], cwd="./src", env=environment, shell = True)
|
|
|
|
try:
|
|
while gui_proc.poll() is None or app_proc.poll() is None:
|
|
time.sleep(0.1)
|
|
|
|
except KeyboardInterrupt:
|
|
gui_proc.terminate()
|
|
app_proc.terminate()
|
|
print("Processes Terminated") |