STINNER Victor added the comment:

+       # Flush Python buffers to system buffers
+       fileobj.flush()
+
+       if hasattr(os, 'fsync'):
+           # Flush system buffers to disk
+           fd = fileobj.fileno()
+           os.fsync(fd)

A fsync=True paramater may be added if calling os.fsync() is an issue.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8604>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to