shutil.get_unpack_formats()

shutil.get_unpack_formats()

Return a list of all registered formats for unpacking. Each element of the returned sequence is a tuple (name, extensions, description).

By default shutil provides these formats:

  • gztar: gzip’ed tar-file
  • bztar: bzip2’ed tar-file (if the bz2 module is available.)
  • xztar: xz’ed tar-file (if the lzma module is available.)
  • tar: uncompressed tar file
  • zip: ZIP file

You can register new formats or provide your own unpacker for any existing formats, by using register_unpack_format().

doc_python
2016-10-07 17:41:56
Comments
Leave a Comment

Please login to continue.