py2exe for WMI

Tim Golden tim.golden at viacom-outdoor.co.uk
Tue May 24 12:00:17 EDT 2005


[Thomas Heller]

[... snip problems with py2exe & WMI ...]

| The OP of the thread Tim mentions here already had a solution, if I 
| understood him correctly, and the other things that were suggested 
| didn't work.  Basically, IIUC, he did add the typelib 
| wrappers from the 
| 'other' windows version manually to the library.zip file.
| 
| Totally different solutions would be:
| - change Tim's wmi.py module so that it works with dynamic 
| binding (no 
| typelib wrappers needed)
| or

Well, if it helps, there's a version of the WMI module
that uses dynamic binding on my site:

http://timgolden.me.uk/python/downloads/wmi-0.6a.py

I've hardcoded the relevant constants (which is pretty 
much all I was using early binding for) and replaced 
any other EnsureDispatch calls with simple Dispatch.

Does anyone want to give it a try to let me know if
it helps? I don't use py2exe myself.

TJG


________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________



More information about the Python-list mailing list