crayons.py 文件源码

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

项目:pipenv 作者: pypa 项目源码 文件源码
def color_str(self):
        style = 'BRIGHT' if self.bold else 'NORMAL'
        c = '%s%s%s%s%s' % (getattr(colorama.Fore, self.color), getattr(colorama.Style, style), self.s, colorama.Fore.RESET, getattr(colorama.Style, 'NORMAL'))

        if self.always_color:
            return c
        elif sys.stdout.isatty() and not DISABLE_COLOR:
            return c
        else:
            return self.s
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号