I made a little helper function:
import zipfile def main(archive_list=[],zfilename='default.zip'): print zfilename zout = zipfile.ZipFile(zfilename, "w") for fname in archive_list: print "writing: ", fname zout.write(fname) zout.close() if __name__ == '__main__': main()
The problem is that all my files DO NOT TELL! Files are the same size, and, in fact, only the extension changes to ".zip" (hence the ".xls" in this case).
I am running python 2.5 on winXP sp2.
python compression zipfile
Ramy Nov 12 2018-10-12 15:56
source share