Replacing files in a zip archive

Дамјан Георгиевски gdamjan at
Fri May 1 12:01:33 CEST 2009

> Which will produce the same output as the original, confounding
> your user.  You could just write the new values out, since .read
> picks the last entry (as I believe it should).  Alternatively, if
> you want to replace it "in place", you'll need a bit more smarts
> when there is more than one copy of a file in the archive (when
> z.namelist.count(filename) > 1).

I think I'll just hope that there will never be an ODF file like that, 
and if there is, then it's not my problem :)

дамјан ( )

Give me the knowledge to change the code I do not accept, 
the wisdom not to accept the code I cannot change, 
and the freedom to choose my preference.

More information about the Python-list mailing list