python force flush stdout