Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #71744
| References | <CALyJZZU9yJpTQZkL77uM+92TdW=UR=4n4oxmMFPXiF4mCr73+g@mail.gmail.com> <20140518213256.5a0f2d71@bigbox.christie.dr> <CALyJZZXyox2XjgBkomXuq0o5259GjwbzWyGeo_MhVrRJ_dGEYg@mail.gmail.com> <CALwzidmgde9jzE7=SOSPeYxYLPsn5cP_Kj89s6MSiOX3AwaBpg@mail.gmail.com> |
|---|---|
| From | Vincent Davis <vincent@vincentdavis.net> |
| Date | 2014-05-18 22:02 -0600 |
| Subject | Re: bz2.decompress as file handle |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.10122.1400472151.18130.python-list@python.org> (permalink) |
[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
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: bz2.decompress as file handle Vincent Davis <vincent@vincentdavis.net> - 2014-05-18 22:02 -0600
csiph-web