做淘宝类网站,网站挑错,千图网免费海报素材图库,学做美食的视频网站使用zipfile模块#xff0c;我创建了一个脚本来提取我的归档文件#xff0c;但是这个方法会破坏除txt文件之外的所有内容。在def unzip(zip):
filelist []
dumpfold rM:\SVN_EReportingZones\eReportingZones\data\input\26012012
storage rM:\SVN_EReportingZones\eRepor…使用zipfile模块我创建了一个脚本来提取我的归档文件但是这个方法会破坏除txt文件之外的所有内容。在def unzip(zip):
filelist []
dumpfold rM:\SVN_EReportingZones\eReportingZones\data\input\26012012
storage rM:\SVN_EReportingZones\eReportingZones\data\input\26012012__download_dump
file storage \\ zip
unpack dumpfold \\ str(zip)
print file
try:
time.sleep(1)
country str(zip[:2])
countrydir dumpfold \\ country
folderthere 0
if exists(countrydir):
folderthere 1
if folderthere 0:
os.makedirs(countrydir)
zfile zipfile.ZipFile(file, r)
## print zf.namelist()
time.sleep(1)
shapepresent 0
这里我有一个问题-通过读写压缩数据zipfile命令似乎使它无法被相关程序使用-我试图解压shapefile以在ArcGIS中使用。。。在
^{pr2}$
可以用系统命令调用WinRar并让它帮我解包吗干杯亚历克斯
编辑
使用wb方法后它适用于我的大多数文件但有些文件仍在损坏。当我使用winRar手动解压有问题的文件时它们会正确加载并且文件大小也会更大。在
有人能告诉我加载winRar的方向吗在