Add file to zip, or replace file in zip

Roger Miller roger.miller at nova-sol.com
Fri Apr 28 16:51:50 EDT 2006


First note that zipfile is a plain Python module, so reading
Python.../Lib/zipfile.py will reveal all its secrets.

I don't think it is possible to replace archive members using the
module. You could copy all the files into a new zip file, replacing the
ones you want to change as you go. But it might be easier just to use
os.system() or something similar to run an external zip program.




More information about the Python-list mailing list