En Thu, 19 Mar 2009 00:52:54 -0200, <prometheus...@gmail.com> escribió:
I'm aware that C, and thus Python I suppose, will cache file writes for efficiency and to avoid excessive disk activity,
Python 2.X, yes, because it uses C file streams (FILE) to implement Python file objects. Python 3.x avoids that layer.
Does the cache get written simply when an X-byte buffer fills up, and can I change X?
Yes, use the bufsize argument to open.
Does it write after waiting so long?
I don't think so. You may call flush() yourself after some time. -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list