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


Groups > comp.lang.python > #43955 > unrolled thread

Re: unzipping a zipx file

Started bySerhiy Storchaka <storchaka@gmail.com>
First post2013-04-20 18:45 +0300
Last post2013-04-20 18:45 +0300
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#43955 — Re: unzipping a zipx file

FromSerhiy Storchaka <storchaka@gmail.com>
Date2013-04-20 18:45 +0300
SubjectRe: unzipping a zipx file
Message-ID<mailman.853.1366472728.3114.python-list@python.org>
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.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web