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

Chris Bergstresser chris at subtlety.com
Wed Sep 29 23:41:12 CEST 2010

On Wed, Sep 29, 2010 at 5:23 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> Anyway, the obvious way to write line-by-line to a bz2 file is to use
> the BZ2File class!

   The BZ2File class does not allow you to open a file for appending.
   Using the incremental encoder does work, which leads to the obvious
question of why the codecs.open() method doesn't use the incremental
method by default, at least in this case.

-- Chris

More information about the Python-Dev mailing list