예제 #1
0
파일: events.py 프로젝트: mathben/PyDC1394
 def __init__(self, **kw):
     """
     Init procedure
     """
     self.observers = {}
     self.supervisor = EventSupervisor()
     self.uid_gen = generator.uid_generator()
     self.wref = kw.pop("weakref", True)
예제 #2
0
 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
예제 #3
0
파일: events.py 프로젝트: mathben/PyDC1394
 def __init__(self, **kw):
     """
     Init procedure
     """
     self.observers = {}
     self.supervisor = EventSupervisor()
     self.uid_gen = generator.uid_generator()
     self.wref = kw.pop("weakref", True)
예제 #4
0
 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
예제 #5
0
 def __init__(self, supervisor = None):
     """
     """
     self.__observers__ = ()
     self.__uid_gen__ = generator.uid_generator()
     self.supervisor = EventSupervisor() if supervisor is None else supervisor