On 3/5/23 09:35, aapost wrote:


Guess it could just be an annoying gotcha thing on me.

calling at least

f.flush()

in any cases where an explicit close is delayed would be the solution.

Additionally (not sure if this still applies):
flush() does not necessarily write the file’s data to disk. Use flush() followed by os.fsync() to ensure this behavior.
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to