python 压缩文件/文件夹

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_29007291/article/details/83307257

利用shutil模块,

import shutil
shutil.make_archive("n", "tar", "png_folder/")

pnf_folder文件夹压缩为 tar 格式, 命名为n

猜你喜欢

转载自blog.csdn.net/qq_29007291/article/details/83307257