[python] What is the best way to repeatedly execute a function every x seconds?