Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #43935
| Path | csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <davea@davea.name> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.003 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'output': 0.05; 'subject:file': 0.07; 'filename': 0.09; 'parameter': 0.09; 'python': 0.11; 'suggest': 0.14; 'archive': 0.14; 'windows': 0.15; "'r'": 0.16; 'fine.': 0.16; 'missing?': 0.16; 'skip:z 30': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'file,': 0.19; 'machine': 0.22; 'header:User-Agent:1': 0.23; 'looks': 0.24; 'extension': 0.26; 'second': 0.26; 'code:': 0.26; 'header:In-Reply-To:1': 0.27; 'errors': 0.30; 'extract': 0.31; 'file': 0.32; 'probably': 0.32; 'text': 0.33; 'open': 0.33; 'packaging': 0.33; "i'd": 0.34; 'problem': 0.35; 'but': 0.35; 'thanks': 0.36; 'should': 0.36; 'to:addr:python-list': 0.38; 'files': 0.38; 'pm,': 0.38; 'anything': 0.39; 'to:addr:python.org': 0.39; 'skip:o 30': 0.61; 'received:74.208': 0.68; 'received:74.208.4.194': 0.84 |
| Date | Fri, 19 Apr 2013 16:29:58 -0400 |
| From | Dave Angel <davea@davea.name> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: unzipping a zipx file |
| References | <kks0lu+q4pj@eGroups.com> |
| In-Reply-To | <kks0lu+q4pj@eGroups.com> |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Provags-ID | V02:K0:lh5Gy7ibCZT0BsmVy8fFzpXQ85nZUgw/I1z3modPaeM 3MIpiqyt6GDrJC2sYkg/55f6V74qrP+ul/DNFllrHNmakWvo9f qycMeXLZ6LFZ2cUau8AacVkUiXo7SSlqIJsEaWpf1g4nzVF+fK DOBGwrCeq/hsvYpUkls3YM4X4+oFTODwP3ngSq2Vateubhbp4l FUmHyqtcYxTqCp43pLGGdnTJcDUf8u5vhwr9GLlSbRIX9i2sS+ fTFA2Lqyo9CSe8ee9uFVoJohU1/7OfpqcwPIEoAZ+shCd5W18r n4/4+jkOuqjiR+PS2tf6IIba1Xbo/R/nrcZC5hcg6ekLBJ7ew= = |
| 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.840.1366403429.3114.python-list@python.org> (permalink) |
| Lines | 24 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1366403429 news.xs4all.nl 2241 [2001:888:2000:d::a6]:56616 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:43935 |
Show key headers only | View raw
On 04/19/2013 01:59 PM, b_erickson1 wrote: > 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. No errors are thrown. The file is just a text file not a jpeg or anything else. I can open the file with 7zip and extract the text file out just fine. > > > What am I missing? > > Thanks > The second parameter to ZipFile() probably should be 'rb' not 'r' Likewise, I'd suggest using 'wb' on the output file, though that's not your problem here. -- DaveA
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: unzipping a zipx file Dave Angel <davea@davea.name> - 2013-04-19 16:29 -0400
csiph-web