This is a memo.
echo_hoge.py
from twisted.internet import task, reactor
#Function to execute
def echo():
print "hoge"
if __name__ == '__main__':
#Execution interval
interval = 1
#Register the function in the loop and execute it at the specified interval
instance = task.LoopingCall(echo)
instance.start(interval)
#Start a twisted event loop
reactor.run()
Recommended Posts