environment/lib/python2.7/site-packages/IPython/frontend/qt/console/console_widget.py
def _readline(self, prompt='', callback=None):
        """ Reads one line of input from the user.

        Parameters
        ----------
        prompt : str, optional
            The prompt to print before reading the line.

        callback : callable, optional
            A callback to execute with the read line. If not specified, input is
            read *synchronously* and this method does not return until it has
            been read.

        Returns
        -------
        If a callback is specified, returns nothing. Otherwise, returns the
        input string with the trailing newline stripped.
        """
        if self._reading:
            raise RuntimeError('Cannot read a line. Widget is already reading.')

        if not callback and not self.isVisible():
            # If the user cannot see the widget, this function cannot return.
            raise RuntimeError('Cannot synchronously read a line if the widget '
                               'is not visible!')

        self._reading = True
        self._show_prompt(prompt, newline=False)

        if callback is None:
            self._reading_callback = None
            while self._reading:
                QtCore.QCoreApplication.processEvents()
            return self._get_input_buffer(force=True).rstrip('\n')

        else:
            self._reading_callback = lambda: \
                callback(self._get_input_buffer(force=True).rstrip('\n'))
def _readline(self, prompt='', callback=None):
        if self._reading:
            raise RuntimeError('Cannot read a line. Widget is already reading.')

        if not callback and not self.isVisible():
            # If the user cannot see the widget, this function cannot return.
            raise RuntimeError('Cannot synchronously read a line if the widget '
                               'is not visible!')

        self._reading = True
        self._show_prompt(prompt, newline=False)

        if callback is None:
            self._reading_callback = None
            while self._reading:
                QtCore.QCoreApplication.processEvents()
            return self._get_input_buffer(force=True).rstrip('\n')

        else:
            self._reading_callback = lambda: \
                callback(self._get_input_buffer(force=True).rstrip('\n'))
def _readline ( self , prompt = '' , callback = None ) : if self . _reading : raise RuntimeError ( 'Cannot read a line. Widget is already reading.' ) if not callback and not self . isVisible ( ) : # If the user cannot see the widget, this function cannot return. raise RuntimeError ( 'Cannot synchronously read a line if the widget ' 'is not visible!' ) self . _reading = True self . _show_prompt ( prompt , newline = False ) if callback is None : self . _reading_callback = None while self . _reading : QtCore . QCoreApplication . processEvents ( ) return self . _get_input_buffer ( force = True ) . rstrip ( '\n' ) else : self . _reading_callback = lambda : callback ( self . _get_input_buffer ( force = True ) . rstrip ( '\n' ) )
Reads one line of input from the user.

        Parameters
        ----------
        prompt : str, optional
            The prompt to print before reading the line.

        callback : callable, optional
            A callback to execute with the read line. If not specified, input is
            read *synchronously* and this method does not return until it has
            been read.

        Returns
        -------
        If a callback is specified, returns nothing. Otherwise, returns the
        input string with the trailing newline stripped.
Reads one line of input from the user .