解压压缩包
zipobj.extract() #解压压缩包的某个文件
import zipfile with zipfile.ZipFile('我的文件夹.zip','r') as zipobj: zipobj.extract('我的文件夹/demo18.py', 'new_dir') #解压压缩包的某个文件到某个文件夹下 print(zipobj.namelist())
zipobj.extractall() 解压压缩包全部文件
import zipfile with zipfile.ZipFile('我的文件夹.zip','r') as zipobj: zipobj.extractall()
标签:解压,zipobj,zipfile,extractall,2.14,extract,压缩包 From: https://www.cnblogs.com/988MQ/p/16837667.html