Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道是否有一个模块可以让程序查看正在运行的任务。例如,如果我正在运行 Google Chrome、Python Idle 和程序,它应该看到所有 3。(最重要的是它可以看到它自己。)
psutil
psutil 是一个提供接口的模块,用于使用 Python 以可移植的方式检索有关所有正在运行的进程和系统利用率(CPU、磁盘、内存、网络)的信息。