flush method

flush(self)

Clears all buffers for this stream and causes any buffered data to be written to the underlying device.

def flush(self):
    ...

See Also