Message307542
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'. |
|
Date |
User |
Action |
Args |
2017-12-04 07:29:43 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, paul.moore, tim.golden, zach.ware, steve.dower, BoppreH |
2017-12-04 07:29:43 | serhiy.storchaka | set | messageid: <1512372583.44.0.213398074469.issue30213@psf.upfronthosting.co.za> |
2017-12-04 07:29:43 | serhiy.storchaka | link | issue30213 messages |
2017-12-04 07:29:43 | serhiy.storchaka | create | |
|