code: def readline(self):
          
          buf = []
          while 1:
              try:
                  ch = self.read(1)
              except EOFError:
                  return ''.join(buf)
              buf.append(ch)
              if ch == '\n':
                  return ''.join(buf)
docs: Read one line from the pseudoterminal as bytes.
  
          Can block if there is nothing to read. Raises :exc:`EOFError` if the
          terminal was closed.