widgets.py 文件源码

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

项目:Prism 作者: Stumblinbear 项目源码 文件源码
def render(self):
        view = View('none')

        box = BoxElement(title='widget.info.header', icon='server', padding=False)
        table = TableElement(
                                content=[
                                        ('widget.info.os', '%s %s (%s)' % (platform.system(), platform.release(), platform.architecture()[0])),
                                        ('widget.info.hostname', platform.node()),
                                        ('widget.info.ipaddress', prism.settings.PRISM_CONFIG['host']),
                                        ('widget.info.uptime', self.get_uptime())
                                    ]
                            )
        box.add(table)
        view.add(box)

        return view
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号