Message236565
I'd be interested in taking up the zip portion at Pycon 2015 this year. I recently had need to delete file(s) from a zipfile.
To do it today with the existing API requires you to unpack the zip and repack it. The unpack is slow and you need enough free disk space for the uncompressed files.
My strategy is essentially exactly what msg229893 2a said: copy binary blobs to a tempfile, then overwrite the original when complete. I would use a name filter function to decide what to delete and optional parameter for the temp file (falling back to tempfile.tempfile if None). IIRC, this is the same strategy used in the dotNet zip library. |
|
Date |
User |
Action |
Args |
2015-02-25 09:23:36 | Dave Sawyer | set | recipients:
+ Dave Sawyer, loewis, rhettinger, terry.reedy, lars.gustaebel, christian.heimes, rossmclendon, eric.araujo, ubershmekel, victorlee129, sandro.tosi, chroipahtz, serhiy.storchaka, Arthur.Darcet |
2015-02-25 09:23:36 | Dave Sawyer | set | messageid: <1424856216.6.0.30527781327.issue6818@psf.upfronthosting.co.za> |
2015-02-25 09:23:36 | Dave Sawyer | link | issue6818 messages |
2015-02-25 09:23:36 | Dave Sawyer | create | |
|