[python-win32] WMI performance issues?

Tim Golden mail at timgolden.me.uk
Mon Apr 19 09:46:32 CEST 2010

On 18/04/2010 21:45, drkfce at speakeasy.net wrote:
> In the following code, there is a substantial performance difference from a
> minor change. I'm guessing it has to do with the lower level calls and not the
> actual wrapper, but I am curious if anyone can explain it.
> http://paste.pocoo.org/show/202976/

The answer lies in the fact that Name is the key value for CIM_DataFile
while Description is not:

import wmi

print (wmi.WMI ().CIM_DataFile.keys)


As a bonus, you can run the wmiweb.py which comes with the wmi package
and browse around the classes looking at theirproperties, keys, etc.


More information about the python-win32 mailing list