NEMKAI56.0 / app.py
bumblebee100's picture
Update app.py
39ebb63 verified
raw
history blame contribute delete
553 Bytes
import subprocess
import time
# Define the commands to run
command1 = ["python3", "-m", "http.server", "7860"]
command2 = ["qemu-system-x86_64", "kali-linux.iso"]
# Start the first process
process1 = subprocess.Popen(command1)
# Start the second process
process2 = subprocess.Popen(command2)
# Wait for both processes to complete (optional)
try:
process1.wait()
process2.wait()
except KeyboardInterrupt:
# Handle Ctrl+C to terminate both processes
process1.terminate()
process2.terminate()
process1.wait()
process2.wait()