Ahmed, Shakir wrote:
Thanks for your help and really appreciate your time.
I changed the code as you mentioned and here it is:
fn = open('T:\\applications\\tst\\py\\Zip_Process\\Zip\\myzip.zip',
'rb')
z = zipfile.ZipFile(fn)
for name in z.namelist():
data = z.read(name)
ptr = 0
size = len(name) # change this back to data
^- No. You need the size of the data read in from the
zipfile for that name, not the length of the name. Sorry for the omission.
print size
print ptr
while ptr < size:
fn.write(name[ptr:ptr+CHUNK_SIZE]) # change name to data
ptr += CHUNK_SIZE
fn.close()
~Ethan~
--
http://mail.python.org/mailman/listinfo/python-list