예제 #1
0
    def cancel(self, prompt=False):
        """Update the shell to indicate a 'cancel'.

        :type prompt: boolean
        :param prompt: If True, force a redraw of the prompt & line.
        """

        self.stdout.write(str(" ^C") + "\n")
        readline.replace_line("")
        if prompt:
            readline.redisplay(True)
예제 #2
0
    def cancel(self, prompt=False):
        """Update the shell to indicate a 'cancel'.

        :type prompt: boolean
        :param prompt: If True, force a redraw of the prompt & line.
        """

        self.stdout.write(str(" ^C") + "\n")
        readline.replace_line("")
        if prompt:
            readline.redisplay(True)
예제 #3
0
 def redisplay(self, force=False):
     """Update the screen to reflect the current contents of
     :attr:`~rl.Completion.line_buffer`. If ``force`` is True, readline
     redisplays the prompt area as well as the line."""
     readline.redisplay(force)
예제 #4
0
def interrupt():
    clear_readline()
    print('Interrupting cow -- moo!')
    readline.redisplay(True)
    Timer(2, interrupt).start()
예제 #5
0
파일: _completion.py 프로젝트: tony/rl
 def redisplay(self, force=False):
     """Update the screen to reflect the current contents of
     :attr:`~rl.Completion.line_buffer`. If ``force`` is True, readline
     redisplays the prompt area as well as the line."""
     readline.redisplay(force)
예제 #6
0
파일: console.py 프로젝트: hpk42/p4p
def display(message):
    clear_readline()
    print(message)
    readline.redisplay(True)