I have a master thread that spawns other threads. The master thread does periodic status checks that I print/flush/update with:
status = "Queued: {} | Workers: {}".format(queued_status, worker_status)
sys.stdout.flush()
sys.stdout.write("\r{}".format(status))
This works great, but it ultimately gets jumbled in with the print statements from the worker threads.
So, how would I designate the status print to the top (it just updates in place), and have the threads print below? Something like this:
Queued: No | Workers: 4
........................
Thread print
Thread print
Thread print
Where the thread print will just keep scrolling (like a normal terminal window), but the status is locked to the top.