[英]Using Python, how can I obtain the running process and the exe name for that process?
假設我有一個exe運行,它的名字是myexe.exe
。 在Windows上,我可以在Process Explorer中看到myexe.exe
的進程。 使用Python,我如何獲取myexe.exe
的進程ID並將其關閉?
在Windows上執行此操作的最佳方法是使用PyWin32( http://sourceforge.net/projects/pywin32 )
請查看以下代碼示例: http : //coding.derkeiler.com/Archive/Python/comp.lang.python/2007-10/msg00717.html
它可能正是您所需要的。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.