推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
Marsss
V2EX  ›  Python

tqdm 库在 windows 的 cmdshell 下,为什么进度条不是一条直线,样式可以修改吗?

  •  
  •   Marsss · Aug 16, 2018 · 6236 views
    This topic created in 3003 days ago, the information mentioned may be changed or developed.
    我希望进度条显示样式是这样的:


    结果在 cmdshell 下显示的样式是这样的:


    有用过这个库的 TX 吗,是不是系统问题。
    4 replies  •  2018-08-16 17:45:59 +08:00
    Trim21
    Trim21
    Aug 16, 2018 via Android❤️1
    1
    似乎是 Unicode 的显示问题…
    设置 ncols 可以限制最大宽度,应该可以避免因为宽度不一直导致的换行
    我是设置了 ascii=True,换成了#号的样式
    Trim21
    Trim21
    Aug 16, 2018 via Android
    2
    想要手动设置参数的话有 bar_format,emmm 不过我从来没设置成功过
    Marsss
    Marsss
    OP
    Aug 16, 2018
    3
    @Trim21 好像暂时只能用你说的 ascii=True,换成#号样式了,虽然丑了点,至少是直的。。。
    yy461530593
    yy461530593
    Aug 16, 2018
    4
    mac 下测试爬虫挺好用的库
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2885 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 12:04 · PVG 20:04 · LAX 04:04 · JFK 07:04
    ♥ Do have faith in what you're doing.