how to flush the input stream in python?,sys.stdout.flush()