Python COM and distribution issues

hungjunglu at yahoo.com hungjunglu at yahoo.com
Mon May 14 13:02:41 EDT 2001


--- In python-list at y..., Robin Becker <robin at j...> wrote:
> I think you misunderstand the GUID generation mechanisms that M$
> provide. By including various probabilistic arguments and values
> unlikely to be common to more than one CPU M$ claim in 'GUID 
Creation
> and Optimisations'

Thanks, but I don't think I misunderstood the GUID generation 
mechanism. 128 bits are 128 bits, and I think you did not understand 
that part. 128 is a finite number. It's large enough that people do 
credit card transactions over interenet (high-encryption keys). But 
it's a finite number. There are no magic in computers. A finite 
number is a finite number. 

As Mark Hammond mentions again and again in his book: "do not copy 
this GUID, generate it instead by using pythoncom.CreateGuid()" OK, I 
guess what he means is that it's OK to hard-code the GUID numbers, 
but generate them each once using pythoncom.CreateGuid(), and then, 
as I said before, just sit and hope for the best. The chance of 
collision (mean collision time) is probably longer than the age of 
Solar System, but shorter than the age of the Universe. In his book, 
then, it is not necessary to tell users to avoid copying the GUIDs in 
the book, because that's all what GUID is about: low probability of 
collision.

---------------

Now a more serious question: does anyone know how to distribute an 
application containing a PythonCom server component?

I'll have to ask directly to Mark, I guess.

PythonCOM is great to be distributed as COM clients, but as COM 
servers, it is quite complicated to install on third-party machines. 
I guess a lot of registry tweaking needs to be done, and issues come 
up when dealing with multiple copies, version controlling, etc. I 
guess that happens with all languages that can implement COM servers. 
Is there any good reference to start looking into the registry 
structure of COM?

Right now it seems like the only practical way of distributing Python 
COM server applications is to install a whole copy of ActiveState's 
Python distribution, and install the rest on top of it. This is not a 
nice way of distributing your applications.

Is there any better way?

regards,

Hung Jung2











More information about the Python-list mailing list