Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #43955

Re: unzipping a zipx file

From Serhiy Storchaka <storchaka@gmail.com>
Subject Re: unzipping a zipx file
Date 2013-04-20 18:45 +0300
References <kks0lu+q4pj@eGroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.853.1366472728.3114.python-list@python.org> (permalink)

Show all headers | View raw


19.04.13 20:59, b_erickson1 написав(ла):
> I have python 2.6.2 and I trying to get it to unzip a file made with winzip pro.  The file extension is zipx.  This is on a windows machine where I have to send them all that files necessary to run.  I am packaging this with py2exe.  I can open the file with
> zFile = zipfile.ZipFile(fullPathName,'r')
> and I can look through all the file in the archive
> for filename in zFile.namelist():
> but when I write the file out with this code:
>              ozFile = open(filename,'w')
>              ozFile.write(zFile.read(filename))
>              ozFile.close()
> that file still looks encrypted.

AFAIK some archivers use zipx extension for zip files which contains 
files compressed with advanced compression methods (bzip2, lzma, etc). 
Python supports bzip2 and lzma compression in zip files since 3.3.

> No errors are thrown.

Python 2.7 and 3.2 should raise an exception (this bug was fixed several 
months ago). 2.6 is too old and this fix was not backported to it.

 > What am I missing?

Use Python 3.3 or at least 2.7.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: unzipping a zipx file Serhiy Storchaka <storchaka@gmail.com> - 2013-04-20 18:45 +0300

csiph-web