Exemple #1
0
  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)
Exemple #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 = []
Exemple #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
Exemple #4
0
 def __init__(self,*args,**kwargs):
   Subject.__init__(self)
   Observer.__init__(self)
   Reloadable.__init__(self)
   self.initialize(*args,**kwargs)
Exemple #5
0
 def __init__(self):
   Observer.__init__(self)
   self._connected = False