archive

Reading multiple zip archive comments with python

Reading multiple zip archive comments with python Question: My zip file contains a lot of smaller zip files. I want to iterate through all those files, reading and printing each of their comments. I’ve found out that zipfile file.zip or unzip -z file.zipcan do this to a file in separate, but I’m looking for a …

Total answers: 3

Python in-memory zip library

Python in-memory zip library Question: Is there a Python library that allows manipulation of zip archives in memory, without having to use actual disk files? The ZipFile library does not allow you to update the archive. The only way seems to be to extract it to a directory, make your changes, and create a new …

Total answers: 9

How to create a zip archive of a directory?

How to create a zip archive of a directory? Question: How can I create a zip archive of a directory structure in Python? Asked By: Martha Yi || Source Answers: You probably want to look at the zipfile module; there’s documentation at http://docs.python.org/library/zipfile.html. You may also want os.walk() to index the directory structure. Answered By: …

Total answers: 28