binary file woes... (was: Re: chr(26) => file reading bug)

Jeff Senn senn at
Tue Mar 28 23:04:08 CEST 2000

"Fredrik Lundh" <effbot at> writes:
> Michal Bozon <bozon at> wrote:
> > When it is opened a file containing a char chr(26) (i.e. chr(0x1A)), it is
> > read only until this char.
> by reading the fine manual:
>     If mode is omitted, it defaults to 'r'. When opening a binary file, you
>     should append 'b' to the mode value for improved portability. (It's
>     useful even on systems which don't treat binary and text files
>     differently, where it serves as documentation.)

Reminds me -- I noticed the other day that '' opens files in
default/non-binary mode which nearly caused me to delete a whole bunch
of non-different files... :-( given the name of the module and the
analogous unix command -- this is probably the wrong behavior...


More information about the Python-list mailing list