The function supports the following compression types by default:
- zip
- bztar
- gztar
- tar
Example:
compressFile = shutil.make_archive(r"c:\temp\mycompressfile", "zip", r"c:\temp\data")
Notice that the first parameter doesn't have the file extension. The function will return the path to the newly created compressed file.
To uncompress the file, you will have to do that manually using zipfile or tarfile modules.
Enjoy