python 关闭指定进程

import psutil
def guanbi():
    TARGET = "adb.exe"
    [process.kill() for process in psutil.process_iter() if process.name() == TARGET]

 

posted @ 2022-10-17 11:02  myrj  阅读(94)  评论(0编辑  收藏  举报