Message286296
On Python 2, it's easy to workaround the issue, just always go the end explicitly:
f = open(filename, "a+")
f.seek(0, os.SEEK_END)
Or use the io module which doesn't use the stdio of the C library and has a portable and reliable behaviour:
f = io.open(filename, "a+")
Georg Brandl: "This is a somewhat unfortunate difference between the major C libs and Python's new IO, but probably too late to change."
Since it's easy to workaround the issue and only one user complained lat 2 years (3 years?), sorry, I close now the issue.
I add this bug to my long list of bugs in the C stdio which won't be fixed in Python 2...
http://haypo-notes.readthedocs.io/python.html#bugs-in-the-c-stdio-used-by-the-python-i-o |
|
Date |
User |
Action |
Args |
2017-01-26 08:08:35 | vstinner | set | recipients:
+ vstinner, georg.brandl, pitrou, tim.golden, Arfrever, docs@python, zach.ware, eryksun, steve.dower, nicksjacobson, caitlinwalker37 |
2017-01-26 08:08:35 | vstinner | set | messageid: <1485418115.67.0.801853687146.issue22651@psf.upfronthosting.co.za> |
2017-01-26 08:08:35 | vstinner | link | issue22651 messages |
2017-01-26 08:08:35 | vstinner | create | |
|