windows script host and python

Tim Roberts timr at probo.com
Sat Mar 17 23:57:12 EST 2001


"Alex Martelli" <aleaxit at yahoo.com> wrote:
>
>Here, for example, is the "list all running processes" WMI scripting
>example translated into Python:
>
>from win32com.client import GetObject
>
>processes = GetObject("winmgmts:{impersonationLevel=impersonate}").\
>    InstancesOf("Win32_process")
>
>for process in processes:
>    print process.Name

Cool!  Is this supposed to be NT-only?  It doesn't fly on my Win98 box.
--
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.



More information about the Python-list mailing list