Name

flush

Synopsis

                        m.flush([offset,n])

Ensures that all changes made to m also exist on m’s file. Until you call m .flush, it’s uncertain whether the file reflects the current state of m. You can pass a starting byte offset offset and a byte count n to limit the flushing effect’s guarantee to a slice of m. You must pass both arguments, or neither: it is an error to call m .flush with exactly one argument.

Get Python in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.