Type Library for Python COM Server

Peter Hansen peter at engcorp.com
Tue Sep 7 09:30:45 EDT 2004


Paul Keating wrote:

> I have written a Python COM server, which works fine, but VB/C# users
> expect to see the server in a drop-down list of objects, and they
> don't. I suspect that this is because there isn't a type library for
> it. Is there an easy way to create one or do I have to code one up in
> IDLE by hand?

The manual approach is still the easiest way to create one,
although there is work ongoing in the ctypes community to
improve that situation.  Subscribe to the ctypes mailing list
if you are interested.  (I might even be out of date already on the
first comment, if you're lucky.)

In the meantime, I recommend writing them by hand in IDL (it's pretty
trivial to copy an existing one and edit) and compiling them
with the MIDL compiler (MIDL.EXE) that is available in the SDK
that you can download for free.  I don't have a URL handy, Google
can probably help.

-Peter



More information about the Python-list mailing list