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


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

Re: CRC-checksum failed in gzip

Started byLaszlo Nagy <gandalf@shopzeus.com>
First post2012-08-01 12:47 +0200
Last post2012-08-01 12:47 +0200
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: CRC-checksum failed in gzip Laszlo Nagy <gandalf@shopzeus.com> - 2012-08-01 12:47 +0200

#26346 — Re: CRC-checksum failed in gzip

FromLaszlo Nagy <gandalf@shopzeus.com>
Date2012-08-01 12:47 +0200
SubjectRe: CRC-checksum failed in gzip
Message-ID<mailman.2817.1343818024.4697.python-list@python.org>
On 2012-08-01 12:39, andrea crotti wrote:
> We're having some really obscure problems with gzip.
> There is a program running with python2.7 on a 2.6.18-128.el5xen (red
> hat I think) kernel.
>
> Now this program does the following:
> if filename == 'out2.txt':
>       out2 = open('out2.txt')
> elif filename == 'out2.txt.gz'
>       out2 = open('out2.txt.gz')
Gzip file is binary. You should open it in binary mode.

out2 = open('out2.txt.gz',"b")

Otherwise carriage return and newline characters will be converted (depending on the platform).

[toc] | [standalone]


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


csiph-web