player.py 文件源码

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

项目:discord_chat_bot 作者: chromaticity 项目源码 文件源码
def _pprint_meter(self, perc, *, char='#', text='', shift=True):
        tx, ty = get_terminal_size()

        if shift:
            outstr = text + "{}".format(char * (int((tx - len(text)) * perc) - 1))
        else:
            outstr = text + "{}".format(char * (int(tx * perc) - 1))[len(text):]

        print(outstr.ljust(tx - 1), end='\r')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号