You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a reference to the comments made on #7. The windows implementation on python seems to struggle with reading and writing to a file without seeks and flushes separating them. While I was seeking between the read() and write(), I did not between the write() and the next blocks read(). One hacky way to solve this is a seek. Any seek, even if it does nothing, like f.seek(f.tell()) will fix it. Or the more proper way (which will come in a commit fixing this issue soon) is f.flush(). I just wanted to document it.
The text was updated successfully, but these errors were encountered:
This is a reference to the comments made on #7. The windows implementation on python seems to struggle with reading and writing to a file without seeks and flushes separating them. While I was seeking between the read() and write(), I did not between the write() and the next blocks read(). One hacky way to solve this is a seek. Any seek, even if it does nothing, like f.seek(f.tell()) will fix it. Or the more proper way (which will come in a commit fixing this issue soon) is f.flush(). I just wanted to document it.
yea. i have played with this before in other projects and if memory serves, there are platform inconsistencies in how 'b+' is handled. but I may be wrong, that could be fixed, or just not applicable here. Either way, i may get around to fixing this, but this project is not in active development currently.
But if you would like to fix and test it, i would accept a pull request.
This is a reference to the comments made on #7. The windows implementation on python seems to struggle with reading and writing to a file without seeks and flushes separating them. While I was seeking between the read() and write(), I did not between the write() and the next blocks read(). One hacky way to solve this is a seek. Any seek, even if it does nothing, like
f.seek(f.tell())
will fix it. Or the more proper way (which will come in a commit fixing this issue soon) isf.flush()
. I just wanted to document it.The text was updated successfully, but these errors were encountered: