def readline(self, timeout):
buf = self.__remainder<EOL>while not '<STR_LIT:\n>' in buf:<EOL><INDENT>buf += self._read_timeout(timeout)<EOL><DEDENT>n = buf.index('<STR_LIT:\n>')<EOL>self.__remainder = buf[n+<NUM_LIT:1>:]<EOL>buf = buf[:n]<EOL>if (len(buf) > <NUM_LIT:0>) and (buf[-<NUM_LIT:1>] == '<STR_LIT:\r>'):<EOL><INDENT>buf = buf[:-<NUM_LIT:1>]<EOL><DEDENT>return buf<EOL>
Read a line from the socket.  We assume no data is pending after the
line, so it's okay to attempt large reads.