【问题标题】:Is there a way to kill a task running on windows 10 with python?有没有办法用 python 杀死在 Windows 10 上运行的任务?
【发布时间】:2022-01-03 03:44:31
【问题描述】:

就像在任务管理器中模拟“结束任务”按钮一样?有 API 吗?

【问题讨论】:

    标签: python operating-system task


    【解决方案1】:

    查看this

    import os
    os.system("taskkill /im yourTask.exe")
    

    【讨论】:

    • 感谢为我工作
    猜你喜欢
    • 1970-01-01
    • 2021-11-04
    • 2011-11-29
    • 1970-01-01
    • 2023-01-08
    • 1970-01-01
    • 2017-06-24
    • 1970-01-01
    • 2017-05-04
    相关资源
    最近更新 更多