display.py 文件源码

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

项目:sshchan 作者: einchan 项目源码 文件源码
def __init__(self, config, board):
        """Initialize the most needed components."""
        self.config = config
        self.board = board

        self.header = None
        self.footer = None
        # Some sugar.
        self.div = ur.Divider()
        # Used in list_boards().
        self.boards_count = 0

        self.loop = Loop(None, self.unhandled)
        # Calculate min_width and left/right margins for Padding widgets.
        self.width = self.loop.dimensions[0] // 2
        self.margin = int((self.loop.dimensions[0] - self.width) * 0.60)
        # Flag for checking if board list is currently being displayed.
        self.list_visible = False
        # This flag needs to be here to fix a bug where Enter doesn't work
        # after hitting 'h' twice.
        self.help_flag = False
        # Another flag, this one is for board list display - it should only
        # be printed in the main menu/MOTD screen, nowhere else.
        self.motd_flag = False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号