Message240874
Instead of the loop you can use writelines():
f.writelines([b'\0' * bs] * (size // bs))
It would be nice to add a comment that estimate why os.ftruncate() or seek+write can't be used here. At least a link to this issue with short estimation. |
|
Date |
User |
Action |
Args |
2015-04-14 11:54:59 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, pitrou, neologix, python-dev, sbt, mboquien |
2015-04-14 11:54:59 | serhiy.storchaka | set | messageid: <1429012499.55.0.915872859583.issue21116@psf.upfronthosting.co.za> |
2015-04-14 11:54:59 | serhiy.storchaka | link | issue21116 messages |
2015-04-14 11:54:59 | serhiy.storchaka | create | |
|