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

Jack Jansen jack@oratrix.nl
Sat, 06 Oct 2001 00:49:59 +0200


Recently, Guido van Rossum <guido@python.org> said:
> > A wild idea (and basically why I added Guido to the cc list): file
> > objects could make our life a lot simpler if there was a call
> > file.readtoterminator(termchars, max), where termchars is a string, which
> > would read data up to and including a character in termchars (or until
> > 'max' bytes have been read). It would have to be implemented as a
> > getc() loop in C, but as we're going to do that looping anyway at some
> > point we might as well do it in C and not in Python...
> 
> Hm, that makes sense.  I'm missing some context (didn't see Chris
> Barker's msg) but feel free to propose a patch for such a method.

Chris: would this method help you? If it would I can put in a patch
for the C code, but I'll leave the Python stuff to you.
--
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