'''
#zip格式压缩包
import zipfile
#压缩
z=zipfile.ZipFile('yesterday.zip','w')
z.write('yesterday')
z.close()

#解压
z=zipfile.ZipFile('yesterday.zip','r')
z.extractall()
z.close()
'''

'''
#tar格式压缩包
import tarfile
#压缩
tar=tarfile.open('副本.tar','w')
tar.add('E:/文档/PycharmProjects/s14/老男孩/day5/shutil模块/yesterday',arcname='yesterday')
tar.close()

#解压
tar=tarfile.open('','')
tar.extractall()#可设置解压地址
tar.close()
'''