python tutorial

Steven D'Aprano steven at
Thu Jun 18 03:05:20 EDT 2009

On Thu, 18 Jun 2009 15:58:37 +1000, steve wrote:

> "Steven D'Aprano" <steven at> wrote in
> message news:pan.2009. at
>> On Thu, 18 Jun 2009 10:36:01 +1000, steve wrote:
>>> 1) Windows does not make a distinction between text and binary files.
>> Of course it does.
> Ok, Python makes a distinction between text and binary files.

Microsoft have reported a bug where cmd.exe fails to recognise EOF in a 
text file:

The behaviour of reading past the \0x1A character is considered a bug, 
which says that cmd.exe at least (and by extension Windows apps in 
general) are expected to stop reading at \0x1A for text files.

Technically, the Windows file systems record the length of text files and 
so an explicit EOF character is redundant, nevertheless, the behaviour of 
stopping the read at \0x1A is expected. Whether you want to claim it is 
"Windows" or "the Windows shell" or something else is a fine distinction 
that makes little difference in practice.

Anyway, here's Raymond Chen of Microsoft explaining more:


More information about the Python-list mailing list