nonblocking timer in python
<p>I am developing an app in python with pyGtk+Glade.</p>

<p>I want to execute a function every N seconds (just like in javascript the function setTimeout()). If the user perform a click, some action must be done, and the timer must be reset.</p>

<p>I was trying with <code>threading.Timer</code>, something like this:</p>

<pre><code>def callback():
    print "callback executed"

t = threading.Timer(10.0, callback)
t.start()
</code></pre>

<p>but it doesn't work for me because it blocks everything for the N secs and doesn't capture the user click.</p>

<p>Any other option?</p>
