Tin mới
zipfile — Work with ZIP archives
Data Compression and Archiving
gzip: Interfaces for gzip compression and decompression using file objects.
reads and writes gzip, bz2, compression.zstd, and lzma compressed archives if the respective modules are available.
bz2: Interfaces for bzip2 compression and decompression.
reads and writes gzip, bz2, compression.zstd, and lzma compressed archives if the respective modules are available.
compression.zstd: Low-level interface to compression and decompression routines in the zstd library.
reads and writes gzip, bz2, compression.zstd, and lzma compressed archives if the respective modules are available.
lzma: A Python wrapper for the liblzma compression library.
reads and writes gzip, bz2, compression.zstd, and lzma compressed archives if the respective modules are available.
Requirements for optional modules
reads and writes gzip, bz2, compression.zstd, and lzma compressed archives if the respective modules are available.
Return a TarFile object for the pathname name. For detailed information on TarFile objects and the keyword arguments that are allowed, see TarFile Objects.
The default character encoding: 'utf-8' on Windows, the value returned by sys.getfilesystemencoding() otherwise.
Documentation of the higher-level archiving facilities provided by the standard shutil module.
The extraction filter used as a default for the filter argument of extract() and extractall().
copy: Shallow and deep copy operations.
A TarInfo object represents one member in a TarFile. Aside from storing all required attributes of a file (like file type, size, time, permissions, owner etc.), it provides some useful methods to determine its type. It d
Time of last modification in seconds since the epoch, as in os.stat_result.st_mtime.
Normalize filenames (TarInfo.name) that contain .. components using os.path.normpath(). Note that this removes internal .. components, which may change the meaning of the name if it traverses symbolic links.
Extract to a new temporary directory to prevent e.g. exploiting pre-existing links, and to make it easier to clean up after a failed extraction.