[python-win32] wmi query. hi:

how do you incorporate a where clause and selected field clause in a wmi
query ?

this gets me caption and state fields for all services
  c = wmi.WMI()
  for service in c.Win32_Service (['Caption', 'State'])
     ...

this gets me all fields for stopped services
c = wmi.WMI()
for service in c.Win32_Service ('State == 'Stopped')
   ....

is the way to incorporate both queries into one something like this
c = wmi.WMI()
for service in c.Win32_Service (['Caption', 'State'])  WHERE ('State ==
'Stopped')

cheers
mark
