> On 7/30/07, Mark Hammond <[EMAIL PROTECTED]> wrote:
> > There should be no need to create an IDL file - enough interfaces are
> > exposed so that we can create the typelib directly.
>
> Ah, after some looking around, I see that there is
> pythoncom.CreateTypeLib and CreateTypeLib2.  Is this what you mean?

Yep.

> I was assuming the use of decorators, but it also may be possible to
> just extend the current class variable syntax.

> The other idea I had was to use something like zope.interface where
> one defines the interfaces in a separate class.  This sits half way
> between using something like IDL where the interfaces are in a
> separate file (and different language) and using decorators / class
> variables where your class has all the information.  The advantage
> that I can see is that it makes it clearer to the programmer when they
> need to change the version number / GUID of the typelib.  If they
> change the interface class, they need to change the version number.
> If they just change the implementation class, they do not.  It may
> also make it easier to write unit tests to check that the
> implementation class complies with the interface.

I think that is getting a bit too heavy-weight - if people really want
formal interface definitions, then they can stick with the IDL and having
their Python code reference the typelib.  I'm more interested in an
"informal" approach where people can create a typelib for the benefit of
other languages but without adding too much overhead.

Cheers,

Mark

_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to