how to flush output of python print?,sys.stdout.flush()