Python - Extracting files from a large (6GB+) zip file
问题 I have a Python script where I need to extract the contents of a ZIP file. However, the zip file is over 6GB in size. There is a lot of information about zlib and zipfile modules, however, I can't find a single approach that works in my case. I have the code: with zipfile.ZipFile(fname, "r") as z: try: log.info("Extracting %s " %fname) head, tail = os.path.split(fname) z.extractall(folder + "/" + tail) except zipfile.BadZipfile: log.error("Bad Zip file") except zipfile.LargeZipFile: log.error