[issue7638] Counterintuitive str.splitlines() inconsistency.

Florent Xicluna report at bugs.python.org
Tue Jan 5 08:34:00 CET 2010


Florent Xicluna <laxyf at yahoo.fr> added the comment:

IMHO this code will do the trick:

while not request_buffer.endswith(('\r', '\n')):
    request_buffer += self.conn.recv(1024)
    print("Got a line!")

print("Got an empty line!")
self.handleRequest(request_buffer)

----------
nosy: +flox

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7638>
_______________________________________


More information about the Python-bugs-list mailing list