I'm currently running Windows 7, and I'd like to be able to check whats going on programaticly using Python. How would I go about getting all the currently runing processes and applications?
Asked
Active
Viewed 768 times
2 Answers
1
Get the WMI module and then check out this cookbook for some simple examples. Note this is not the most efficient way, talking to the win32 api with ctypes is faster but much much more legwork.
To list all currently running processes:
import wmi
c = wmi.WMI ()
for process in c.Win32_Process ():
print process.ProcessId, process.Name

Henry
- 6,502
- 2
- 24
- 30