📅  最后修改于: 2022-03-11 14:46:50.452000             🧑  作者: Mango
import subprocess, os
my_env = os.environ.copy()
my_env["PATH"] = "/usr/sbin:/sbin:" + my_env["PATH"]
subprocess.Popen(my_command, env=my_env)