widgets.py 文件源码

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

项目:fuzzinator 作者: renatahodovan 项目源码 文件源码
def init_popup(self, msg):
        width = max([len(line) for line in msg.splitlines()] + [20])
        height = msg.count('\n') + 4
        cols, rows = os.get_terminal_size()
        self.get_pop_up_parameters = lambda: dict(left=max(cols // 2 - width // 2, 1),
                                                  top=max(rows // 2 - height // 2, 1),
                                                  overlay_width=width,
                                                  overlay_height=height)
        return self.open_pop_up()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号