'recvline_endswith(delims, keepends = False, timeout = default) -> str
Keep receiving lines until one is found that starts with one of
`delims`.  Returns the last line received.
If the request is not satisfied before ``timeout`` seconds pass,
all data is buffered and an empty string (``\'\'``) is returned.
See :meth:`recvline_startswith` for more details.
Examples:
>>> t = tube()
>>> t.recv_raw = lambda n: \'Foo\nBar\nBaz\nKaboodle\n\'
>>> t.recvline_endswith(\'r\')
\'Bar\'
>>> t.recvline_endswith(tuple(\'abcde\'), True)
\'Kaboodle\n\'
>>> t.recvline_endswith(\'oodle\')
\'Kaboodle\''

def recvline_endswith(self, delims, keepends=False, timeout=default):

    if isinstance(delims, (str, unicode)):
        delims = (delims,)
    delims = tuple(((delim + self.newline) for delim in delims))
    return self.recvline_pred((lambda line: any(map(line.endswith, delims))), keepends=keepends, timeout=timeout)
