import psutil
PROCNAME = "python.exe"
for proc in psutil.process_iter():
# check whether the process name matches
if proc.name() == PROCNAME:
proc.kill()
python kill process by name
最新推荐文章于 2020-12-03 12:10:16 发布