def __init__(self, **kw): """ Init procedure """ self.observers = {} self.supervisor = EventSupervisor() self.uid_gen = generator.uid_generator() self.wref = kw.pop("weakref", True)
def __init__(self, supervisor = None, weakref = False): """ Init procedure """ self.observers = {} self.supervisor = EventSupervisor() if supervisor is None else supervisor self.uid_gen = generator.uid_generator() self.wref = weakref
def __init__(self, **kw): """ Simple Init method which creates the events """ self.uid_gen = generator.uid_generator() for evt_name in self.events: if hasattr(self, evt_name + "Event"): logger.warning("Event Function Override -- %s --" % evt_name) else: evt = self.event_type(**kw) setattr(self, evt_name + "Event", evt) evt.name = evt_name
def __init__(self, supervisor = None): """ """ self.__observers__ = () self.__uid_gen__ = generator.uid_generator() self.supervisor = EventSupervisor() if supervisor is None else supervisor