creating ZIP files on the cheap

samwyse samwyse at gmail.com
Wed Dec 23 15:34:22 EST 2009


I've got an app that's creating Open Office docs; if you don't know,
these are actually ZIP files with a different extension.  In my case,
like many other people, I generating from boilerplate, so only one
component (content.xml) of my ZIP file will ever change.  Instead of
creating the entire ZIP file each time, what is the cheapest way to
accomplish my goal?  I'd kind-of like to just write the first part of
the file as a binary blob, then write my bit, then write most of the
table of contents as another blob, and finally write a TOC entry for
my bit.  Has anyone ever done anything like this?  Thanks.



More information about the Python-list mailing list