multithreading - Python -- suppress console output for a constantly running thread, not the entire program -
bluf: there way suppress console output single thread?
i have background thread system checks include bunch of pings various things. these ping checks take awhile , results flushed console. don't want them display @ all, found can set stdout devnull.
the problem there system checks in while true loop (with 60 second sleep between loops) , checks take portion of 60 seconds i'm afraid suppressing console output during these functions result in no console output percentage of total runtime entire program -- console output might later want see main thread.
you replace sys.stdout custom class filters output based on thread.
Comments
Post a Comment