[OT] Re: are there some special about '\x1a' symbol

Grant Edwards grante at visi.com
Wed Jan 14 08:39:54 EST 2009


On 2009-01-14, Gabriel Genellina <gagsl-py2 at yahoo.com.ar> wrote:
> En Tue, 13 Jan 2009 22:04:33 -0200, Terry Reedy <tjreedy at udel.edu>  
> escribió:
>
>> Gabriel Genellina wrote:
>>> En Mon, 12 Jan 2009 12:00:16 -0200, John Machin <sjmachin at lexicon.net>  
>>> escribió:
>>>
>>>> I didn't think your question was stupid. Stupid was (a) CP/M recording
>>>> file size as number of 128-byte sectors, forcing the use of an in-band
>>>> EOF marker for text files (b) MS continuing to regard Ctrl-Z as an EOF
>>>> decades after people stopped writing Ctrl-Z at the end of text files.
>>>  This is called "backwards compatibility" and it's a good thing :)
>>
>> But it does not have to be the default or only behavior to be available.
>
> Sure. And it isn't

It _is_ the default behavior on some systems.  The default file
mode when you open a file in C or in Python is "text" mode.  In
text mode, Windows interprets a ctrl-Z as EOF, doesn't it?

-- 
Grant




More information about the Python-list mailing list