V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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 · 5825 views
    This topic created in 2814 days ago, the information mentioned may be changed or developed.
    我希望进度条显示样式是这样的:


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


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