예제 #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
파일: smartloop.py 프로젝트: adewes/pyview
 def __init__(self):
   """
   Initialize the loop factory.
   """
   if hasattr(self,'_initialized'):
     return
   self._initialized = True
   Subject.__init__(self)
   Singleton.__init__(self)
   Reloadable.__init__(self)
   self._loops = []
예제 #5
0
파일: smartloop.py 프로젝트: adewes/pyview
 def __init__(self,values = range(0,100),name = 'loop'):
   Subject.__init__(self)
   Reloadable.__init__(self)
   self._factory = LoopFactory()
   self._index = 0
   self._values = values
   self._factory.addLoop(self)
   self._forward = True
   self._paused = False
   self._stopped = False
   self._name = name
예제 #6
0
 def __init__(self,name = "[root]",parent = None):
   Subject.__init__(self)
   self._parent = None
   self._children = []
   self._name = name
   self.setParent(parent)
예제 #7
0
파일: coderunner.py 프로젝트: zennro/pyview
 def __init__(self,gv = dict(),lv = dict()):
   Reloadable.__init__(self)
   Subject.__init__(self)
   self._threadID = 0
   self.clear(gv = gv,lv = lv)
예제 #8
0
파일: datacube.py 프로젝트: zennro/pyview
 def __init__(self,*args,**kwargs):
   Subject.__init__(self)
   Observer.__init__(self)
   Reloadable.__init__(self)
   self.initialize(*args,**kwargs)