[Interface-dev] module-level interface

Jim Fulton jim at zope.com
Wed Jun 8 10:52:13 EDT 2005


John Lenton wrote:
> In a system I'm working on (Cimarrón) there are 'skins' that are
> modules that must provide a certain interface, and part of that
> interface are classes that must provide a certain interface. Is there
> any way to use zope.interface so that the skin loader can verify the
> skin's adhesion to the interface? 

A module can declare interfaces just like any other object.

In fact, there's a specific API for doing this, moduleProvides.

Note that zope.interface.__init__ used moduleProvides to declare that
zope.interface provides the IInterfaceDeclaration interface.

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org


More information about the Interface-dev mailing list