Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment: The problem is that seek() doesn't work properly with files opened in append mode.
with open('file', 'ab') as f: f.write(b'abcd') f.seek(0) f.write(b'efgh') f.flush() with open('file', 'rb') as f: print(f.read()) The result is b'abcdefgh' instead of expected b'efgh'. ---------- resolution: duplicate -> stage: resolved -> status: closed -> open superseder: Regression in zipfile writing in 2.7.13 -> _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue30213> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com