ui.py 文件源码

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

项目:sweetshot 作者: AnCh7 项目源码 文件源码
def print_permissions(account):
    t = PrettyTable(["Permission", "Threshold", "Key/Account"], hrules=allBorders)
    t.align = "r"
    for permission in ["owner", "active", "posting"]:
        auths = []
        for type_ in ["account_auths", "key_auths"]:
            for authority in account[permission][type_]:
                auths.append("%s (%d)" % (authority[0], authority[1]))
        t.add_row([
            permission,
            account[permission]["weight_threshold"],
            "\n".join(auths),
        ])
    print(t)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号