'Read a line of text.
:returns: An 8-bit string.'

def readline(self):

    s = ''
    while True:
        c = self.read(1)
        if (not c):
            break
        s = (s + c)
        if (c == '\n'):
            break
    return s
