Esempio n. 1
0
class TimedUpdater:
   '''
   Class that updates the learner.xml file at an interval
   '''
   def __init__(self,seconds):
      self.seconds=seconds
      self.updater=LearnerUpdater()
      self.timer=Timer(self.seconds,self.begin)
   def begin(self):
      self.updater.getLearner()
      self.timer.cancel()
      self.timer=Timer(self.seconds,self.begin)
      self.timer.start()
Esempio n. 2
0
 def __init__(self,seconds):
    self.seconds=seconds
    self.updater=LearnerUpdater()
    self.timer=Timer(self.seconds,self.begin)