Ejemplo n.º 1
0
    def __init__(self):
        self._trace_walker = TraceWalker()
        self._trace_view = AlwaysOnTopListBox(self._trace_walker)
        self._edit_line = AdvancedEdit()
        self._info_line = urwid.Text('')
        self._footer = AnsiText(self._footer_text)
        self._command_indicator = urwid.Text('')
        self._command_indicator_string = '--> '
        self._command_mode = None
        self._last_command = None
        self._last_filter = None
        self._hex = False
        self._show_field_names = False
        self._cancel_operation = False
        self._progress_notification_record_multiple = 0

        footer_columns = urwid.AttrMap(
            urwid.Columns([self._footer, self._info_line]), 'foot')
        wrapped_edit_line = urwid.Columns([
            ('fixed', len(self._command_indicator_string),
             self._command_indicator), self._edit_line
        ])
        footer = urwid.Pile([footer_columns, wrapped_edit_line])

        self._main_frame = urwid.Frame(urwid.AttrWrap(self._trace_view,
                                                      'body'),
                                       footer=footer)
Ejemplo n.º 2
0
 def _format_raw_record(self, record):
     if not record:
         return None
     else:
         return AnsiText(record, wrap="clip")