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

Thomas Wouters thomas at xs4all.net
Tue Mar 28 16:27:53 EST 2000


On Tue, Mar 28, 2000 at 04:04:08PM -0500, Jeff Senn wrote:

> >     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 'cmp.py' 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...

This was fixed in the CVS tree in july last year. But apparently, cmp.py and
dircmp.py have been removed from the tree, with the last log message stating
they are declared obsolete. I'm not sure if this means they wont be included
in 1.6 or not. Anyone care to comment ?

Backwardly-worried-ly y'rs,

-- 
Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!




More information about the Python-list mailing list