推荐学习书目
› 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 · 6126 views
    This topic created in 2965 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   ·   Privacy   ·   Solana   ·   2955 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 12:56 · PVG 20:56 · LAX 05:56 · JFK 08:56
    ♥ Do have faith in what you're doing.