title: Timer cannot restart after it is being stopped in Python
body: <p>I am using Python 2.7. I have a timer that keeps repeating a timer callback action until it has been stopped. It uses a Timer object. The problem is that after it has been stopped, it cannot be restarted. The Timer object code is as follows;</p>
  
  <pre><code>from threading import Timer
  
  class RepeatingTimer(object):
      def __init__(self,interval, function, *args, **kwargs):
          super(RepeatingTimer, self).__init__()
          self.args = args
          self.kwargs = kwargs
          self.function = function
          self.interval = interval
  
      def start(self):
          self.callback()
  
      def stop(self):
          self.interval = False       
  
      def callback(self):
          if self.interval:
              self.function(*self.args, **self.kwargs)
              Timer(self.interval, self.callback, ).start()
  </code></pre>
  
  <p>To start the timer, the code below is run;</p>
  
  <pre><code>repeat_timer = RepeatingTimer(interval_timer_sec, timer_function, arg1, arg2)
  repeat_timer.start()    
  </code></pre>
  
  <p>To stop the timer, the code is;</p>
  
  <pre><code>repeat_timer.stop() 
  </code></pre>
  
  <p>After it is stopped, I tried to restart the timer by calling <code>repeat_timer.start()</code> but the timer is unable to start. How can the timer be made to restart after it has been stopped?</p>
  
  <p>Thank you.</p>