コード例 #1
0
ファイル: __init__.py プロジェクト: benfitzgerald/shellac
    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
ファイル: __init__.py プロジェクト: mrichar1/shellac
    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
ファイル: play_async_print2.py プロジェクト: hpk42/p4p
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)