Re: Replacing files in a zip archive

2009-05-01 Thread Дамјан Георгиевски
> 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 c

Re: Replacing files in a zip archive

2009-04-30 Thread Scott David Daniels
Дамјан Георгиевски wrote: I'm writing a script that should modify ODF files. ODF files are just .zip archives with some .xml files, images etc. So far I open the zip file and play with the xml with lxml.etree, but I can't replace the files in it. Is there some recipe that does this ? I ended

Re: Replacing files in a zip archive

2009-04-30 Thread Дамјан Георгиевски
> I'm writing a script that should modify ODF files. ODF files are just > .zip archives with some .xml files, images etc. > > So far I open the zip file and play with the xml with lxml.etree, but > I can't replace the files in it. > > Is there some recipe that does this ? I ended writing this, p

Re: Replacing files in a zip archive

2009-04-30 Thread Scott David Daniels
MRAB wrote: Дамјан Георгиевски wrote: I'm writing a script that should modify ODF files. ODF files are just .zip archives with some .xml files, images etc. So far I open the zip file and play with the xml with lxml.etree, but I can't replace the files in it. Is there some recipe that does thi

Re: Replacing files in a zip archive

2009-04-30 Thread MRAB
Дамјан Георгиевски wrote: I'm writing a script that should modify ODF files. ODF files are just .zip archives with some .xml files, images etc. So far I open the zip file and play with the xml with lxml.etree, but I can't replace the files in it. Is there some recipe that does this ? You'l

Replacing files in a zip archive

2009-04-30 Thread Дамјан Георгиевски
I'm writing a script that should modify ODF files. ODF files are just .zip archives with some .xml files, images etc. So far I open the zip file and play with the xml with lxml.etree, but I can't replace the files in it. Is there some recipe that does this ? -- дамјан ( http://softver.org