flush method

flush

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

def flush(self):
    ...

See Also