Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: 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; 'mrab': 0.04; 'snippet': 0.07; 'from:addr:python': 0.09; 'subject:python': 0.10; 'from:addr:mrabarnett.plus.com': 0.16; 'from:name:mrab': 0.16; 'gzip': 0.16; 'message-id:@mrabarnett.plus.com': 0.16; 'received:84.92': 0.16; 'received:84.92.122': 0.16; 'received:84.92.122.60': 0.16; 'received:84.93': 0.16; 'received:84.93.230': 0.16; 'reply-to:addr:python-list': 0.16; 'result)': 0.16; 'subject:Help': 0.17; 'wrote:': 0.18; 'please?': 0.18; 'jan': 0.19; 'subject:list': 0.21; 'header:In-Reply-To:1': 0.22; 'code': 0.25; 'module': 0.26; 'windows': 0.26; 'import': 0.27; 'random': 0.28; 'pm,': 0.29; 'thanks': 0.31; "i've": 0.31; 'header:User-Agent:1': 0.33; 'to:addr:python-list': 0.34; 'received:84': 0.34; 'file.': 0.34; 'reply-to:addr:python.org': 0.34; 'joe': 0.35; 'post': 0.36; 'subject:with': 0.36; 'using': 0.38; 'skip:o 20': 0.38; 'to:addr:python.org': 0.40; 'skip:o 30': 0.63; 'header:Reply-To:1': 0.71; 'reply-to:no real name:2**0': 0.72 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.0 cv=J8QoHXbS c=1 sm=1 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=9jsOeB20M3cA:10 a=2HxXiLbU_NsA:10 a=OUOv7kDek9cA:10 a=8nJEP1OIZ-IA:10 a=EBOSESyhAAAA:8 a=rpRVJo3p1H_QyJLz6cQA:9 a=wPNLvfGTeEIA:10 a=0nF1XD0wxitMEM03M9B4ZQ==:117 X-AUTH: mrabarnett:2500 Date: Fri, 06 Jan 2012 03:00:56 +0000 From: MRAB User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Help with python-list archives References: <78484055-dd01-4237-9217-9eb038fc744f@p16g2000yqd.googlegroups.com> <14749754.624.1325806776674.JavaMail.geo-discussion-forums@vbgw2> <8f3b98e1-3b21-4f06-8456-0a555a7ee523@u32g2000yqe.googlegroups.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: python-list@python.org List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1325818829 news.xs4all.nl 6904 [2001:888:2000:d::a6]:48313 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:18577 On 06/01/2012 02:14, random joe wrote: > On Jan 5, 7:27 pm, MRAB 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()