ProcessBar.py 文件源码

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

项目:Python_Tools 作者: Justin13wyx 项目源码 文件源码
def __init__(self, unit=2, max_len=100):
        if max_len > 100:
            raise IllegalUnitException("The maximum of max_len is 100. %s is too big." % max_len)
        if unit < 1:
            raise IllegalUnitException("The minimum of unit is 1. %s is too small." % unit)
        self._unit = floor(unit)
        self._max_len = floor(max_len)
        self._symbol = "#"
        self._status = 0
        self._bar = sys.stdout
        try:
            self._column = os.get_terminal_size().columns
        except (OSError, AttributeError):
            self._column = 60
        self._return = "\r"
        self._name = "Task"
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号