Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion Python doc problems example: gzip module

View Parsed - Show only message text

Path: g2news1.google.com!news2.google.com!fu-berlin.de!news.westend.com!not-for-mail
From: Peter Maas <pe...@somewhere.com>
Newsgroups: comp.lang.python
Subject: Re: Python doc problems example: gzip module
Date: Wed, 31 Aug 2005 11:47:02 +0200
Organization: WESTEND GmbH - Aachen (+49 241 7013330)
Lines: 46
Message-ID: <df3u8s$3np$1@swifty.westend.com>
References: <1125477977.072146.298670@g47g2000cwa.googlegroups.com>
NNTP-Posting-Host: bras-co-85-197-2-251.westend.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.7) Gecko/20050415
X-Accept-Language: en, de
In-Reply-To: <1125477977.072146.298670@g47g2000cwa.googlegroups.com>

Xah Lee schrieb:
> today i need to use Python to decompress gzip files.
> 
> since i'm familiar with Python doc and have 10 years of computing
> experience with 4 years in unix admin and perl, i have quickly located
> the official doc:
> 
>  http://python.org/doc/2.4.1/lib/module-gzip.html
> 
> but after a minute of scanning, please someone tell me what the fuck is
> it talking about?
> 
> Fuck the Python programing morons.
> 
> Thanks.
> 
> I just need to decompress files. Is it:
> 
> import gzip;
> gzip.GzipFile("/Users/xah/access_log.1.gz");
> 
> can someone put a example into that fucking doc so that people don't
> have to wade thru whatever fuck it is trying to sound big?

Here's the example:
import gzip

# read fucked
fuckedfile = gzip.GzipFile('somefile.gz')
content = fuckedfile.read()
fuckedfile.close()

# write unfucked
unfuckedfile = file('somefile','w')
unfuckedfile.write(content)
unfuckedfile.close()

Please feel free to insert this fucking example into the fucking docs.

Have a nice ... eh fucking day :)

-- 
-------------------------------------------------------------------
Peter Maas,  M+R Infosysteme,  D-52070 Aachen,  Tel +49-241-93878-0
E-mail 'cGV0ZXIubWFhc0BtcGx1c3IuZGU=\n'.decode('base64')
-------------------------------------------------------------------

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google