Python: Do something then sleep, repeat Python: Do something then sleep, repeat python-3.x python-3.x

Python: Do something then sleep, repeat


You will need to create a new thread that runs your code. Put your code in its own method some_function() and then start a new thread like this:

thread = Thread(target = some_function)thread.start()