title: Can't terminate thread with Ctrl-c
body: <p>I've created a setInterval like function in python but cntrl-c can't terminate it Heres the code</p>
  
  <pre><code>import threading
  def setInterval(sec,func,*args,**kw):
      def wrapper():
          setInterval(sec,func,*args,**kw) 
          func(*args,**kw) 
      t = threading.Timer(sec, wrapper)
      t.start()
      return t
  </code></pre>
  
  <p>And here's what I do to run it</p>
  
  <pre><code>&gt;&gt;&gt; setInterval(3,print,"hello")
  &lt;Timer(Thread-1, started 6576)&gt;
  &gt;&gt;&gt; hello
  KeyboardInterrupt
  &gt;&gt;&gt; hello
  </code></pre>
  
  <p>It continues to run after I've hit ctrl-c. How would I add something to have it stop if I use the keyboard interupt? </p>