How to kill a process using process name in python script

后端 未结 0 360
孤独总比滥情好
孤独总比滥情好 2021-01-22 21:13

My requirement is to kill a process. I have the process name. Below is my code:

def kill_process(name):
  os.system(f"TASKKILL /F /IM {name}")


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题