shutil.get_unpack_formats
Prev: shutil.get_terminal_size | Up: shutil | Next: shutil.ignore_patterns
Rel: shutil.chown, shutil.copy, shutil.copy2, shutil.copyfile
Ref: docs.python.org — shutil.get_unpack_formats
Tags: #public #python3 #stdlib #shutil
Import
import shutil
from shutil import get_unpack_formats
Signature & Overview
shutil.get_unpack_formats()
Returns a list of supported formats for unpacking.
Usage
import shutil
names = [name for name, _exts, _desc in shutil.get_unpack_formats()]
assert "zip" in names and "tar" in names
Gotchas
- Returns
(name, extensions, description)tuples: Shows every archive formatunpack_archive()can auto-detect by file extension.
REPL Inspect
from shutil import get_unpack_formats
help(get_unpack_formats)
Linked from
Related notes
- tuts/python3/stdlib_module/shutil/get_terminal_size Linked here; links to this page; shared tags: #shutil, #stdlib
- tuts/python3/stdlib_module/shutil/ignore_patterns Linked here; links to this page; shared tags: #shutil, #stdlib
- tuts/python3/stdlib_module/shutil Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/shutil/chown Linked here; shared tags: #shutil, #stdlib
- tuts/python3/stdlib_module/shutil/copy Linked here; shared tags: #shutil, #stdlib
- tuts/python3/stdlib_module/shutil/copy2 Linked here; shared tags: #shutil, #stdlib
- tuts/python3/stdlib_module/shutil/copyfile Linked here; shared tags: #shutil, #stdlib
- tuts/python3/stdlib_module/shutil/copyfileobj shared tags: #shutil, #stdlib
- tuts/python3/stdlib_module/shutil/copymode shared tags: #shutil, #stdlib
- tuts/python3/stdlib_module/shutil/copystat shared tags: #shutil, #stdlib