[python-win32] Using py2exe with COM server question

Larry Bates lbates@syscononline.com
Tue, 1 Apr 2003 09:28:21 -0600


I have written a Python COM server that is working properly if 
Python is installed on the machine.  I wanted to use py2exe to
"freeze" this into single .EXE for installation on machines that
DO NOT have Python installed.  I came across a "recipe" found at:

http://aspn.activestate.com/ASPN/Mail/Message/543304

that ALMOST explains how to make this happen.

Problem:

I'm confused about how to 'properly' handle the _reg_clsid_ 
attribute of the class.  It is my understanding that this needs 
to come from pythoncom.CreateGuid() on the machine where the COM
object is being installed and it is unique to that machine.
If this is the case, what is the best way to make this happen in 
a 'frozen' COM object?  The example shown has a hard coded GUID
and that just doesn't seem right for distribution to other machines.

Thanks in advance for any information.

Larry Bates
email: lbates@syscononline.com