List Running Programs under Windows

Alan Kennedy alanmk at hotmail.com
Thu May 15 05:53:18 EDT 2003


Joe Aspelund wrote:
> 
> I am programming for Windows (Windows XP more specifically) and I am
> trying to genrate a list of the currently running programs. Similar to
> the "Processes" tab of "Task Manager". A little clarification of the
> program: I want it to change the way it runs depending on other
> programs that are currently running. I just need to generate a list of
> sorts.
> Thanks for any assistance.

If you find WMI too heavyweight for your needs, win32all has support for
Microsoft Performance Data Helper (PDH) built in.

On a python installation that has win32all installed, check the
following file

$PythonHome\Lib\site-packages\win32\lib\win32pdhutil.py

The function "ShowAllProcesses" does exactly what you're looking for, I
believe.

That's assuming that PDH actually runs under Win XP, which I don't know
for sure.

HTH,

-- 
alan kennedy
-----------------------------------------------------
check http headers here: http://xhaus.com/headers
email alan:              http://xhaus.com/mailto/alan




More information about the Python-list mailing list