[Python-checkins] r69520 - python/trunk/Doc/library/stdtypes.rst

benjamin.peterson python-checkins at python.org
Thu Feb 12 04:50:00 CET 2009


Author: benjamin.peterson
Date: Thu Feb 12 04:50:00 2009
New Revision: 69520

Log:
os.fsync() should be used to ensure that data is written to disk

Modified:
   python/trunk/Doc/library/stdtypes.rst

Modified: python/trunk/Doc/library/stdtypes.rst
==============================================================================
--- python/trunk/Doc/library/stdtypes.rst	(original)
+++ python/trunk/Doc/library/stdtypes.rst	Thu Feb 12 04:50:00 2009
@@ -2110,6 +2110,11 @@
    Flush the internal buffer, like ``stdio``'s :cfunc:`fflush`.  This may be a
    no-op on some file-like objects.
 
+   .. note::
+
+      :meth:`flush` does not necessarily write the file's data to disk.  Use
+      :meth:`flush` followed by :func:`os.fsync` to ensure this behavior.
+
 
 .. method:: file.fileno()
 


More information about the Python-checkins mailing list