def _prompt(self, prompt=None):
        """
        Reads a line written by the user

        :param prompt: An optional prompt message
        :return: The read line, after a conversion to str
        """
        if prompt:
            # Print the prompt
            self.write(prompt)
            self.output.flush()

        # Read the line
        return to_str(self.input.readline())
def _prompt ( self , prompt = None ) : if prompt : self . write ( prompt ) self . output . flush ( ) return to_str ( self . input . readline ( ) )
Reads a line written by the user

        :param prompt: An optional prompt message
        :return: The read line, after a conversion to str