def show_traceback(w, size, key):
    if (self.current_exc_tuple is not None):
        from traceback import format_exception
        result = self.dialog(urwid.ListBox(urwid.SimpleListWalker([urwid.Text(''.join(format_exception(*self.current_exc_tuple)))])), [('Close', 'close'), ('Location', 'location')], title='Exception Viewer', focus_buttons=True, bind_enter_esc=False)
        if (result == 'location'):
            self.debugger.set_frame_index((len(self.debugger.stack) - 1))
    else:
        self.message('No exception available.')
def show_traceback(w, size, key):
    if (self.current_exc_tuple is not None):
        from traceback import format_exception
        result = self.dialog(urwid.ListBox(urwid.SimpleListWalker([urwid.Text(.join(format_exception(*self.current_exc_tuple)))])), [('Close', 'close'), ('Location', 'location')], title='Exception Viewer', focus_buttons=True, bind_enter_esc=False)
        if (result == 'location'):
            self.debugger.set_frame_index((len(self.debugger.stack) - 1))
    else:
        self.message('No exception available.')