Message236565
| Author |
Dave Sawyer |
| Recipients |
Arthur.Darcet, Dave Sawyer, christian.heimes, chroipahtz, eric.araujo, lars.gustaebel, loewis, rhettinger, rossmclendon, sandro.tosi, serhiy.storchaka, terry.reedy, ubershmekel, victorlee129 |
| Date |
2015年02月25日.09:23:36 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1424856216.6.0.30527781327.issue6818@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|