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


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

Re: unzipping a zipx file

Started byTim Chase <python.list@tim.thechases.com>
First post2013-04-19 15:45 -0500
Last post2013-04-19 15:45 -0500
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 Tim Chase <python.list@tim.thechases.com> - 2013-04-19 15:45 -0500

#43936 — Re: unzipping a zipx file

FromTim Chase <python.list@tim.thechases.com>
Date2013-04-19 15:45 -0500
SubjectRe: unzipping a zipx file
Message-ID<mailman.841.1366404264.3114.python-list@python.org>
On 2013-04-19 16:29, Dave Angel wrote:
> > zFile = zipfile.ZipFile(fullPathName,'r')
> 
> The second parameter to ZipFile() probably should be 'rb' not 'r'

Just for the record, the zipfile.ZipFile.__init__ maps "r" to open the
file with "rb", so that's not the issue.

Your suggestion about opening the file to write in binary mode is a
good one, but I'd just suggest using ZipFile.extract(...) which is
built in and takes care of writing the file for you. :-)

-tkc

[toc] | [standalone]


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


csiph-web