[Pythonmac-SIG] Re: MacPython and line-endings

Jack Jansen jack@oratrix.nl
Fri, 12 Oct 2001 00:18:08 +0200


Recently, Guido van Rossum <guido@python.org> said:
> I think the presence or absence of the 'b' option on file open modes
> should be interpreted by Python; the stdio files are always opened in
> 'b' mode.

Hmm, another potential problem that just occurred to me: will this
work for fdopen()? On the mac it will (at least with
MacPython/MSL/GUSI combo we're using), but I vaguely remember having
seen some platform (could be widnows, therefore) where you also have a
text flag to open() and where the open() mode should match the
fdopen() mode.

Ah, and another problem (if I can find two in a few minutes there's
probably a lot more): if we're opening files in "b" mode we can't look
at the stdio textmode flag anymore to determine whether our routines
should simply call the underlying fgets/fread or do their magic. And
this looks like a real showstopper:-(
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.cwi.nl/~jack        | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm