How to flush output of Python print?,sys.stdout.flush()