import re
import zipfile
def main():
target = zipfile.ZipFile("channel.zip", 'r')
number = "90052"
filename = number + ".txt"
comment = ""
while 1:
print filename
data = target.read(filename)
data_ = re.findall("nothing is ([0-9]+)", data)
if data_:
comment += target.getinfo(filename).comment
filename = "".join(data_) + ".txt"
else:
break
print comment
if __name__ == "__main__":
main()
'Coding > Python 삽질기' 카테고리의 다른 글
간단한 반복 작업 매크로 (0) | 2011.01.12 |
---|---|
http://www.pythonchallenge.com...Level5 (0) | 2010.12.13 |
http://www.pythonchallenge.com...Level4 (0) | 2010.12.13 |