I'd like to be able to do s = socket.socket(...) s = socket.connect(....) for l in s.readlines(): # process line l but sockets don't support readline(), or readlines(), or anything similar that I can see. Is there away to do this that doesn't involve manually calling split on the results of s.recv() and worrying about whole lines split across recv() calls?