Determine file type (binary or text)

John Machin sjmachin at lexicon.net
Wed Aug 13 18:42:38 EDT 2003


Trent Mick <trentm at ActiveState.com> wrote in message news:<mailman.1060797503.18604.python-list at python.org>...

> Generally I define a text file as "it has no null bytes". I think this
> is a pretty safe definition (I would be interested to hear practical
> experience to the contrary). 

Data file written by C program which has an off-by-one error and is
including a trailing '\0' byte ...




More information about the Python-list mailing list