파이썬을위한 크로스 플랫폼 프로세스 열거 자?
-
15-11-2019 - |
문제
기계의 프로세스를 열거 할 수있는 크로스 플랫폼 모듈이 필요합니다.Windows 및 UNIX에서 작업해야하며 PID 및 프로세스 이름과 같은 것을 얻을 필요가 있습니다.
은 그러한 모듈이 있습니까?
해결책
psutil should work nicely for this.
"psutil is a module providing an interface for retrieving information on all running processes and system utilization (CPU, memory) in a portable way by using Python, implementing many functionalities offered by command line tools like ps, top, kill, lsof and netstat."
제휴하지 않습니다 StackOverflow