[Interface-dev] module-level interface

Jim Fulton jim at zope.com
Wed Jun 8 10:56:33 EDT 2005


John Lenton wrote:
> [whoops! sorry about that]
> 
> In a system I'm working on (Cimarr=F3n) 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? So far I've only been able to
> specify that the module provide the classes, but not that the classes
> provide the interfaces. Any pointers?

Use the directlyProvides function (outside the class definition) or
the classProvides function (inside the function) to declare interfaces
provides by (as opposed to implemented by) the class.

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