Is there a command to close a python program?
if I run with os.system("name.py"), how can I stop it from running?
os.system("name.py")
Is there a command to close a python program?
if I run with os.system("name.py"), how can I stop it from running?
os.system("name.py")
Use subprocesses instead.
import subprocess
# Start
proc = subprocess.Popen(["name.py"])
# Stop
proc.terminate()