Tim Golden wrote: [... snip other examples ...]
> Even that is a slight optimisation. It usually costs little > to pull back all the fields, so I generally write: > > <code> > import wmi > > c = wmi.WMI () > for service in c.Win32_Service (state="Stopped"): > print c.Caption, c.Status > > </code> Sorry. I nearly always drop my samples into the interpreter before pressing [Send]. And this is why! That should have been: <code> import wmi c = wmi.WMI () for service in c.Win32_Service (state="Stopped"): print service.Caption, service.Status </code> (And I actually ran it this time). TJG _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32