-
Notifications
You must be signed in to change notification settings - Fork 0
/
PythonChallenge6.py
31 lines (27 loc) · 1.03 KB
/
PythonChallenge6.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
'''
Created on 31/07/2014
@author: miguel
'''
from zipfile import ZipFile
if __name__ == '__main__':
nextFile = "90052"
comments = []
filename = '/home/miguel/Downloads/channel.zip'
fileZip = ZipFile(filename)
while 1:
try:
currentFile = open("/home/miguel/Downloads/channel/" + nextFile + ".txt")
currentFileName = nextFile + ".txt"
comments.append(fileZip.getinfo(currentFileName).comment)
nextFile = currentFile.read()
print(nextFile)
nextFile = str(nextFile).split("Next nothing is ")[1]
except:
hugeTextImage = ("".join(str(i) for i in comments))
hugeTextImage = str(hugeTextImage).replace("'b'", "").replace("b'", "")
for i in range(0, len(hugeTextImage)):
if hugeTextImage[i] == "\\" or hugeTextImage[i] == "n":
hugeTextImage = str(hugeTextImage).replace(hugeTextImage[i], "\n")
else: pass
print(hugeTextImage)
break