There is a dummy_threading
module in standard library that you can use instead of threading
. It offers the same inteface but runs code sequentially (start
returns when the thread has finished). Of course, your threads must not rely on each other to work in parallel.
import dummy_threading as threading