Example #1
0
 def _key(cls, label, manager):
     try:
         # lazily load key
         key = cls.key
         if isinstance(key, strings):
             key = lazyimport(key)
         # register class key
         ez_register = manager.ez_register
         ez_register(ANamespace, label, key)
         exhaust(imap(
             lambda x: ez_register(KService, x, label),
             iter(key.names(True)),
         ))
     except AttributeError:
         key = manager.key(ANamespace, label)
Example #2
0
 def _events(self, *events):
     '''calls bound to `events`'''
     return chain(*tuple(imap(self._event, events)))