This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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:36Dave Sawyersetrecipients: + 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:36Dave Sawyersetmessageid: <1424856216.6.0.30527781327.issue6818@psf.upfronthosting.co.za>
2015-02-25 09:23:36Dave Sawyerlinkissue6818 messages
2015-02-25 09:23:36Dave Sawyercreate