How to resolve it? 1. import sys sys.stdout.flush() 2.use this command,python -u **.py 3.STDOUT.sync=true