压缩
import zipfile
zip=zipfile.open(‘‘,‘w‘)
zip.write(‘‘)
zip.close()
解压
import zipfile
zip=zipfile.open(‘‘,‘r‘)
zip.extractall(‘‘)
zip.extract(‘filename‘)
zip.close()
时间: 2024-10-07 14:31:17
压缩
import zipfile
zip=zipfile.open(‘‘,‘w‘)
zip.write(‘‘)
zip.close()
解压
import zipfile
zip=zipfile.open(‘‘,‘r‘)
zip.extractall(‘‘)
zip.extract(‘filename‘)
zip.close()