py2exe for WMI

G

GMane Python

Hello All.
I'm trying to 'compile-to-EXE' a python program which uses Win32 & WMI to
pull system info. from the PC such as serial number, CPU speed, etc. I'm
having problems with py2exe -- with regard to Win2000 & WinXP platforms. It
seems that the program only works if I have one typelib for WinXP and a
slightly different one for Win2000. Here is my relevent section from the
py2exe setup.py:
setup(
options = {"py2exe": {"typelibs":
## # typelib for WMI - WinXP
## [('{565783C6-CB41-11D1-8B02-00600806D9B6}', 0,
1, 2)],

# typelib for WMI - Win2000
[('{565783C6-CB41-11D1-8B02-00600806D9B6}', 0, 1,
1)],

# create a compressed zip archive
"compressed": 1,
"optimize": 2,
"packages": ["encodings"],
"excludes": excludes}},
# The lib directory contains everything except the executables and the
python dll.
# Can include a subdirectory name.
zipfile = "lib/shared.zip",

Can anyone tell me how I might make one unified py2exe setup.py that'll
'compile' for both Win2000 & WinXP?

If not, can someone give me a hint as to how I can have a python 'launcher'
which can determine the difference between Win2000 & WinXP? Using the
sys.platform, they both show as Win32.

Thanks!
Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,078
Latest member
MakersCBDBlood

Latest Threads

Top