def postparsing_postcmd(self, stop):
"""This runs after everything else, including after postcmd().
It even runs when an empty line is entered. Thus, if you need to do something like update the prompt due
to notifications from a background thread, then this is the method you want to override to do it.
:param stop: bool - True implies the entire application should exit.
:return: bool - True implies the entire application should exit.
"""
if not sys.platform.startswith('win'):
# Fix those annoying problems that occur with terminal programs like "less" when you pipe to them
if self.stdin.isatty():
proc = subprocess.Popen(shlex.split('stty sane'))
proc.communicate()
return stop
评论列表
文章目录