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


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

Re: bz2.decompress as file handle

Started byVincent Davis <vincent@vincentdavis.net>
First post2014-05-18 22:02 -0600
Last post2014-05-18 22:02 -0600
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: bz2.decompress as file handle Vincent Davis <vincent@vincentdavis.net> - 2014-05-18 22:02 -0600

#71744 — Re: bz2.decompress as file handle

FromVincent Davis <vincent@vincentdavis.net>
Date2014-05-18 22:02 -0600
SubjectRe: bz2.decompress as file handle
Message-ID<mailman.10122.1400472151.18130.python-list@python.org>

[Multipart message — attachments visible in raw view] — view raw

On Sun, May 18, 2014 at 9:44 PM, Ian Kelly <ian.g.kelly@gmail.com> wrote:

> You can just use bz2.open:
>
> >>> with bz2.open('test.txt.bz2', 'rt', encoding='ascii') as f:
> ...     print(f.read())
>

​Thanks I like that better then my solution.
​


Vincent Davis
720-301-3003

[toc] | [standalone]


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


csiph-web