helpers.py 文件源码

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

项目:Shiro 作者: ffao 项目源码 文件源码
def cprint(s, log_level):
        colors = {
            'debug': (Fore.WHITE, Style.NORMAL),
            'info': (Fore.CYAN, Style.NORMAL),
            'warning': (Fore.YELLOW, Style.BRIGHT),
            'error': (Fore.RED, Style.BRIGHT),
            'default': (Fore.WHITE, Style.NORMAL)
        }
        color = (colors[log_level] if log_level in colors else colors['default'])
        print(color[0], end='')
        print(color[1], end='')
        print(s)
        print(Style.RESET_ALL)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号