[python-win32] How to get active process list ?

Tim Johnson tojo2000 at gmail.com
Fri Feb 15 19:29:55 CET 2008


Have you tried using WMI?  http://timgolden.me.uk/python/wmi.html

import wmi
w = wmi.WMI()
processes = w.instances('Win32_Process')
for process in processes:
  print process.name

On Fri, Feb 15, 2008 at 10:11 AM, Stef Mientki <stef.mientki at gmail.com>
wrote:

> hello,
>
> How do I get the list of active processes ?
>
> I tried this call, but ...
>    items, instances = win32pdh.EnumObjectItems(None,None,object,
> win32pdh.PERF_DETAIL_WIZARD)
>    return instances
>
> ... it doesn't reflect dynamic changes,
> just the status quo at the start of my program  :-(
>
> thanks,
> Stef Mientki
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>



-- 
_____________________
Ceci n'est pas un email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20080215/7c614d5f/attachment.htm 


More information about the python-win32 mailing list