File: interface.py

package info (click to toggle)
zope-cmfplone 2.5.1-4etch3
  • links: PTS
  • area: main
  • in suites: etch
  • size: 7,752 kB
  • ctags: 5,237
  • sloc: python: 28,264; xml: 3,723; php: 129; makefile: 99; sh: 2
file content (19 lines) | stat: -rw-r--r-- 702 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from zope.interface import Attribute
from basetool import IPloneBaseTool

class IInterfaceTool(IPloneBaseTool):
    """ This tool exposes the interface package for TTW applications,
    by accepting a dotted name of an interface and exporting the
    IInterface API """

    id = Attribute('id', 'Must be set to "portal_interface"')

    def objectImplements(obj, dotted_name):
        """ Asserts if an object implements a given interface """

    def classImplements(obj, dotted_name):
        """ Asserts if an object's class implements a given interface """

    def namesAndDescriptions(dotted_name, all=0):
        """ Returns a list of pairs (name, description) for a given
        interface"""