Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #18577
| Date | 2012-01-06 03:00 +0000 |
|---|---|
| From | MRAB <python@mrabarnett.plus.com> |
| Subject | Re: Help with python-list archives |
| References | (1 earlier) <14749754.624.1325806776674.JavaMail.geo-discussion-forums@vbgw2> <8f3b98e1-3b21-4f06-8456-0a555a7ee523@u32g2000yqe.googlegroups.com> <CALwzidn5zJVYPsViSx-SV25Ef5qSsY0d8bX=6rcdvPBu8UydZw@mail.gmail.com> <mailman.4464.1325813187.27778.python-list@python.org> <fa7b56e3-68b1-4b37-834d-48ab73177baf@k28g2000yqn.googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.4466.1325818829.27778.python-list@python.org> (permalink) |
On 06/01/2012 02:14, random joe wrote: > On Jan 5, 7:27 pm, MRAB<pyt...@mrabarnett.plus.com> wrote: > >> I've found that if I gunzip it twice (gunzip it and then gunzip the >> result) using the gzip module I get the text file. > > On a windows machine? If so, can you post a code snippet please? > Thanks import gzip in_file = gzip.open(r"C:\2012-January.txt.gz") out_file = open(r"C:\2012-January.txt.tmp", "wb") out_file.write(in_file.read()) in_file.close() out_file.close() in_file = gzip.open(r"C:\2012-January.txt.tmp") out_file = open(r"C:\2012-January.txt", "wb") out_file.write(in_file.read()) in_file.close() out_file.close()
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Help with python-list archives random joe <pywin32@gmail.com> - 2012-01-05 14:44 -0800
Re: Help with python-list archives Miki Tebeka <miki.tebeka@gmail.com> - 2012-01-05 15:39 -0800
Re: Help with python-list archives random joe <pywin32@gmail.com> - 2012-01-05 15:52 -0800
Re: Help with python-list archives Ian Kelly <ian.g.kelly@gmail.com> - 2012-01-05 17:10 -0700
Re: Help with python-list archives random joe <pywin32@gmail.com> - 2012-01-05 16:45 -0800
Re: Help with python-list archives MRAB <python@mrabarnett.plus.com> - 2012-01-06 01:27 +0000
Re: Help with python-list archives random joe <pywin32@gmail.com> - 2012-01-05 18:14 -0800
Re: Help with python-list archives MRAB <python@mrabarnett.plus.com> - 2012-01-06 03:00 +0000
Re: Help with python-list archives random joe <pywin32@gmail.com> - 2012-01-05 20:01 -0800
Re: Help with python-list archives random joe <pywin32@gmail.com> - 2012-01-05 20:08 -0800
Re: Help with python-list archives Chris Angelico <rosuav@gmail.com> - 2012-01-06 15:12 +1100
Re: Help with python-list archives Ian Kelly <ian.g.kelly@gmail.com> - 2012-01-06 00:45 -0700
Re: Help with python-list archives Anssi Saari <as@sci.fi> - 2012-01-10 16:47 +0200
Re: Help with python-list archives Chris Angelico <rosuav@gmail.com> - 2012-01-06 15:11 +1100
Re: Help with python-list archives Ian Kelly <ian.g.kelly@gmail.com> - 2012-01-06 00:41 -0700
Re: Help with python-list archives random joe <pywin32@gmail.com> - 2012-01-06 16:55 -0800
Re: Help with python-list archives Ian Kelly <ian.g.kelly@gmail.com> - 2012-01-05 17:02 -0700
csiph-web