Example #1
0
class Loop(TimeLoop):
  def __init__(self, search, callback, interval=2, preload=1, name='SearchLoop',
               timeout=None):
    super(Loop, self).__init__(name=name, timeout=timeout, interval=interval)
    self.search = Search(search, callback, preload)

  def loop_target(self, t):
    self.search.refresh()
Example #2
0
 def __init__(self, search, callback, interval=2, preload=1, name='SearchLoop',
              timeout=None):
   super(Loop, self).__init__(name=name, timeout=timeout, interval=interval)
   self.search = Search(search, callback, preload)