即使你看到下面这段代码,你还是不一定能得到答案,作者的目的也许就达到了。
#!/usr/bin/python
import zipfile,os
zipFile = zipfile.ZipFile('./channel.zip')
zipFile.extractall('channel')
file_name = './channel/90052.txt'
comments=''
file_prefix = './channel/'
while True:
try:
fp = open(file_name,'r')
file_name_tmp=fp.read().split('Next nothing is ',1)[-1]+'.txt'
file_name=file_prefix+file_name_tmp
comments +=zipFile.getinfo(file_name_tmp).comment
except:
print comments
print zipFile.comment
zipFile.close()
|
阅读(1114) | 评论(0) | 转发(0) |