I have found a something strange when using zipfile.ZipFile() with mode="a".
The following code illustrates:
#Open an existing zip file in append mode
file = zipfile.ZipFile("c:\\test.zip", mode="a")
#Add first file
#Add second file
At the end of this, only the file test2.txt exists in the zip. It seems that
each file overwrites the last rather than adding to the archive.
I have tried this in Python 2.2 and found it works correctly.
Also worth noting is that if a zipfile is opened in append mode when it does
not exist, Jython creates it, whereas Python raises an IOError.
Any insights would be much appreciated.
MSN Photos is the easiest way to share and print your photos: