I'd like to be able to overwrite some bytes at a given offset in a file using Python.
My attempts have failed miserably and resulted :
- either in overwriting the bytes at given offset but also truncating the file just after (file mode = "w" or "w+")
- or in appending the bytes at the end of the file (file mode = "a" or "a+")
Is it possible to achieve it with Python in a portable way ?
TIA for your answers.