我想知道是否有一个模块可以让程序查看正在运行的任务。例如,如果我正在运行 Google Chrome、Python Idle 和程序,它应该看到所有 3 个。(最重要的是它可以看到自己。)
请您参考如下方法:
psutil is a module providing an interface for retrieving information on all running processes and system utilization (CPU, disk, memory, network) in a portable way by using Python.
