shutil.get_archive_formats
Prev: shutil.Error | Up: shutil | Next: shutil.get_terminal_size
Rel: shutil.chown, shutil.copy, shutil.copy2, shutil.copyfile
Ref: docs.python.org — shutil.get_archive_formats
Tags: #public #python3 #stdlib #shutil
Import
import shutil
from shutil import get_archive_formats
Signature & Overview
shutil.get_archive_formats()
Returns a list of supported formats for archiving and unarchiving.
Usage
import shutil
formats = dict(shutil.get_archive_formats())
assert "zip" in formats and "gztar" in formats
Gotchas
- Lists names accepted by
make_archive(): Availability of"bztar"and"xztar"depends on whether Python was built withbz2andlzmasupport.
REPL Inspect
from shutil import get_archive_formats
help(get_archive_formats)
Linked from
Related notes
- tuts/python3/stdlib_module/shutil/Error Linked here; links to this page; shared tags: #shutil, #stdlib
- tuts/python3/stdlib_module/shutil/get_terminal_size 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