A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2010-September/104297.html below:

[Python-Dev] Question on bz2 codec. Is this a bug?

[Python-Dev] Question on bz2 codec. Is this a bug? [Python-Dev] Question on bz2 codec. Is this a bug?Antoine Pitrou solipsis at pitrou.net
Wed Sep 29 23:23:51 CEST 2010
On Wed, 29 Sep 2010 23:05:38 +0200
"M.-A. Lemburg" <mal at egenix.com> wrote:
> 
> The codec is scheduled to be added back to Python3.
> 
> However, it's main use is in working on whole chunks of
> data rather than the line-by-line approach you're after.
> This is provided by the codec's incremental encoder/decoders,
> but these are currently not used by codecs.open() and
> I'm not sure whether the io lib uses them, which could
> be used via the regular open().

The io lib will not work with a codec which doesn't return unicode
strings.

Anyway, the obvious way to write line-by-line to a bz2 file is to use
the BZ2File class!

Regards

Antoine.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4