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


Groups > comp.lang.python > #43955

Re: unzipping a zipx file

Path csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:file': 0.07; 'etc).': 0.09; 'filename': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'bug': 0.12; '2.7': 0.14; 'archive': 0.14; 'windows': 0.15; 'compression': 0.16; 'missing?': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'skip:z 30': 0.16; 'exception': 0.16; 'fix': 0.17; 'trying': 0.19; 'machine': 0.22; 'header:User-Agent:1': 0.23; 'looks': 0.24; 'extension': 0.26; 'least': 0.26; 'code:': 0.26; 'header:X -Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'fixed': 0.29; '(this': 0.29; 'raise': 0.29; 'errors': 0.30; '3.2': 0.31; 'file': 0.32; 'open': 0.33; 'packaging': 0.33; 'but': 0.35; '2.6': 0.36; 'should': 0.36; 'too': 0.37; '8bit%:86': 0.38; 'to:addr :python-list': 0.38; 'files': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'skip:o 30': 0.61; 'advanced': 0.63; 'zip': 0.64; '2.7.': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Serhiy Storchaka <storchaka@gmail.com>
Subject Re: unzipping a zipx file
Date Sat, 20 Apr 2013 18:45:10 +0300
References <kks0lu+q4pj@eGroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 8bit
X-Gmane-NNTP-Posting-Host 37.19.128.2
User-Agent Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5
In-Reply-To <kks0lu+q4pj@eGroups.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.853.1366472728.3114.python-list@python.org> (permalink)
Lines 24
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1366472728 news.xs4all.nl 2254 [2001:888:2000:d::a6]:35043
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:43955

Show key headers only | 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