zipfile.ZipFile.extractall()
zipfile.ZipFile.extractall() is a Python method in the Zipfile Module category. Extracts all ZIP contents into the current or specified directory. The syntax is ZipFile.extractall(path=None, members=None, pwd=None). Parameters: path, members, pwd. Returns: None. A typical example: with zipfile.ZipFile("archive.zip", "r") as z:
z.extractall("output_dir"). A close sibling is zipfile.ZipFile(), which opens a ZIP file for reading, writing, or appending. A close sibling is zipfile.ZipFile.extract(), which extracts a single file from the ZIP archive. A close sibling is zipfile.ZipFile.namelist(), which returns a list of all files and directories in the ZIP archive. A close sibling is zipfile.ZipFile.getinfo(), which returns information about a file in the archive (size, compress_size, date_time). More about this category: ZIP archive handling — ZipFile, extract, extractall, namelist. Related Zipfile Module entries: zipfile.ZipFile(), zipfile.ZipFile.extract(), zipfile.ZipFile.namelist(), zipfile.ZipFile.getinfo(), zipfile.ZipFile.close(), zipfile.is_zipfile(). This page is part of the free Python Reference documentation covering 978+ functions, methods, and modules with examples and parameter details.