Adam Olsen wrote: > On 8/14/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > > (2) newline='': input with untranslated universal newlines mode; lines > > may end in \r, \n, or \r\n, and these are returned untranslated. > > Caveat: this mode cannot be supported by sockets. When reading a lone > \r you need to peek ahead to ensure the next character is not a \n, > but for sockets that may block indefinitely.
You could return as soon as you see the '\r', with a flag set indicating that if the next character that comes in is '\n' it should be ignored. -- Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | Carpe post meridiem! | Christchurch, New Zealand | (I'm not a morning person.) | [EMAIL PROTECTED] +--------------------------------------+ _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com