--- bin/dispatch-conf (revision 7876) +++ bin/dispatch-conf (working copy) @@ -213,6 +213,7 @@ show_new_diff = 0 while 1: + clear_screen() if show_new_diff: os.system((self.options['diff']) % (conf['new'], mrgconf)) show_new_diff = 0 @@ -366,6 +367,19 @@ termios.tcsetattr(fd, termios.TCSADRAIN, old_settings) return ch +def clear_screen(): + try: + import curses + try: + curses.setupterm() + sys.stdout.write(curses.tigetstr("clear")) + sys.stdout.flush() + return + except curses.error: + pass + except ImportError: + pass + os.system("clear 2>/dev/null") # run d = dispatch ()