On 2009-01-14, Gabriel Genellina <gagsl-...@yahoo.com.ar> wrote: > En Tue, 13 Jan 2009 22:04:33 -0200, Terry Reedy <tjre...@udel.edu> > escribió: > >> Gabriel Genellina wrote: >>> En Mon, 12 Jan 2009 12:00:16 -0200, John Machin <sjmac...@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 -- http://mail.python.org/mailman/listinfo/python-list