Hello pythonians,
The only way i came up for deleting a file from a zipfile was to create a temporary zipfile without the file to be deleted and then rename it to the original filename.
In python 2.4 the ZipInfo class had an attribute file_offset
, so it was possible to create a second zip file and copy the data to other file without decompress/recompressing.
This file_offset
is missing in python 2.6, so is there another option than creating another zipfile by uncompressing every file and then recompressing it again?
Is there maybe a direct way of deleting a file in the zipfile, i searched and didn't find anything.
Thanks in advance.