python timer event code example
Example 1: how to run a function in interval in python
# this makes program sleep in intervals
from time import time, sleep
while True:
sleep(1 - time() % 1) # run every 1 second... you can change that
# thing to run
Example 2: python timer()
def hello():
print "hello, world"
t = Timer(30.0, hello)
t.start() # after 30 seconds, "hello, world" will be printed