Periodic signal alarm
<p>I would like a my Python script to receive a periodic alarm say every 5 seconds. I have tried the following code, but it only receive the alarm once then hangs.</p>

<pre><code>import os
import signal
import time

def handler(signum, stack):
    print 'Alarm: ', time.ctime()

signal.signal(signal.SIGALRM, handler)
signal.alarm(5)
</code></pre>