Determine file type (binary or text)

John Machin sjmachin at
Thu Aug 14 00:42:38 CEST 2003

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

> 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