'Write a prompt and read a line.
The returned line does not include the trailing newline.
When the user enters the EOF key sequence, EOFError is raised.'

def raw_input(self, prompt=''):

    self.write(prompt)
    line = self.stdin.readline()
    if (not line):
        raise EOFError
    line = line.rstrip()
    if (line == self.EOF_key_sequence):
        raise EOFError
    else:
        return line
