How to seek and append to a binary file in python?
On some systems, 'ab'
forces all writes to happen at the end of the file. You probably want 'r+b'
.
r+b should work as you wish
Leave out the seek command. You already opened the file for append with 'a'.