예제 #1
0
파일: smartloop.py 프로젝트: manipp4/pyview
  def __init__(self,start,step=None,stop=None,linnsteps=None,name='unamed loop'):
    """
    Initializes the smartloop and adds it to the LoopManager
    """ 
    Subject.__init__(self)
    Observer.__init__(self)
    Reloadable.__init__(self)
    
    self._paused=False
    self._toDelete=False
    self._restart=False
    self._autoreverse=False
       
    self._name=name
    self._start=start
    self._stop=stop
    if linnsteps==None:
      self._step=step
      self._nsteps=int((stop-start)/step)+1 # added +1 by DV in december 2014
    else:
      self._nsteps=linnsteps
      self._step=(stop-start)/linnsteps  
    self._index=0
    self._value = None
    self._previousValue = None

    self._nextParams={} # dictionary of new loop parameters at the next increment

    self.lm=LoopManager()
    self.lm.addLoop(self)
예제 #2
0
 def __init__(self):
   if hasattr(self,"_initialized"):
     return
   self._initialized = True
   Singleton.__new__(self)
   Reloadable.__init__(self)
   Observer.__init__(self)
   ThreadedDispatcher.__init__(self)
   Subject.__init__(self)
   self._loops = []
예제 #3
0
 def __init__(self,globals = {}):
   if hasattr(self,"_initialized"):
     return
   self._initialized = True
   Singleton.__init__(self)
   Reloadable.__init__(self)
   Observer.__init__(self)
   ThreadedDispatcher.__init__(self)
   Subject.__init__(self)
   self._datacubes = []
   self._globals = globals
예제 #4
0
파일: datacube.py 프로젝트: zennro/pyview
 def __init__(self,*args,**kwargs):
   Subject.__init__(self)
   Observer.__init__(self)
   Reloadable.__init__(self)
   self.initialize(*args,**kwargs)
예제 #5
0
파일: patterns.py 프로젝트: adewes/pyview
 def __init__(self):
   Observer.__init__(self)
   self._connected = False