bz2.decompress as file handle
Vincent Davis
vincent at vincentdavis.net
Mon May 19 00:02:02 EDT 2014
On Sun, May 18, 2014 at 9:44 PM, Ian Kelly <ian.g.kelly at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20140518/e6890c50/attachment.html>
More information about the Python-list
mailing list