Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import zipfile
- def main():
- open_order = ['90052.txt']
- infile = open('channel/90052.txt', 'r')
- while infile:
- line = infile.readline().split()
- if line[-1].isdigit():
- open_order.append(line[-1] + '.txt')
- infile = open('channel/' + line[-1] + '.txt')
- comments = ''
- inzip = zipfile.ZipFile('channel.zip')
- for file in open_order:
- zipcomment = inzip.getinfo(file).comment
- comments += zipcomment
- print comments
- main()
- this is the error:
- if line[-1].isdigit():
- IndexError: list index out of range
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement