[Python-3000] encoding hell

Aahz aahz at pythoncraft.com
Mon Sep 4 15:39:52 CEST 2006

On Mon, Sep 04, 2006, Oleg Broytmann wrote:
> On Sun, Sep 03, 2006 at 01:45:28PM -0700, Aahz wrote:
>> You want to be able to read the file and write data to it.  That argues
>> in favor of seek(0) and seek(-1) being the only supported behaviors,
>> though.
>    Sometimes programs need tell() + seek(). Two examples (very similar,
> really).
>    Example 1. I have a program, an email robot that receives email(s) and
> marks email addresses in a "database" that is actually a text file:

[snip examples of file with email addresses and INN control files]

My understanding is that those are in fact binary files that are being
treated as line-oriented "text" files.  I would agree that there needs
to be a way to do line-oriented processing on binary files, but anyone
who attempts to process these as text files is foolish at best.
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

I support the RKAB

More information about the Python-3000 mailing list