def update(self, redraw=True):
        """redraw interface"""
        # get the main urwid.Frame widget
        mainframe = self.root_widget.original_widget

        # body
        if self.current_buffer:
            mainframe.set_body(self.current_buffer)

        # footer
        lines = []
        if self._notificationbar:  # .get_text()[0] != ' ':
            lines.append(self._notificationbar)
        if self._show_statusbar:
            lines.append(self.build_statusbar())

        if lines:
            mainframe.set_footer(urwid.Pile(lines))
        else:
            mainframe.set_footer(None)
        # force a screen redraw
        if self.mainloop.screen.started and redraw:
            self.mainloop.draw_screen()
def update ( self , redraw = True ) : mainframe = self . root_widget . original_widget if self . current_buffer : mainframe . set_body ( self . current_buffer ) lines = [ ] if self . _notificationbar : lines . append ( self . _notificationbar ) if self . _show_statusbar : lines . append ( self . build_statusbar ( ) ) if lines : mainframe . set_footer ( urwid . Pile ( lines ) ) else : mainframe . set_footer ( None ) if self . mainloop . screen . started and redraw : self . mainloop . draw_screen ( )
redraw interface