ecs_explorer.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:ecs_explorer 作者: firemanphil 项目源码 文件源码
def __init__(self, initial_buttons):
        self.list_stack = [initial_buttons]
        self.all_styled_buttons = [urwid.AttrMap(b, None, 'reveal focus')
                                   for b in initial_buttons.items]
        self.list_walker = ChooseFromListWalker(self.all_styled_buttons, self)
        list_box = ChooseFromListBox(self.list_walker)

        column_array = convert_details_to_columns(
            initial_buttons.items[0].retrieve_important_details())

        self.cols = urwid.Columns(
            [('weight', 1, column_array[0]), ('weight', 4, column_array[1])], )
        self.detail_view = False
        self.base_title_text = self.list_stack[-1].items_title
        self.title = urwid.AttrMap(urwid.Text(self.base_title_text + " " + self.EMPTY_FILTER_TEXT), 'title')
        self.cols_title = urwid.AttrMap(urwid.Text(u'Attributes'), 'title')
        self.body = urwid.Pile([(2, urwid.Filler(self.title, valign='top')), list_box, (
            2, urwid.Filler(self.cols_title, valign='top')), self.cols])
        self.before_detail = None
        self.filter_string = ""
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号