推荐学习书目
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
praynise
V2EX  ›  Python

请问有那款 ascii table(例如 taulate, terminaltables, texttable)包可以输出中文的时候排版不移位的?

  •  
  •   praynise · Dec 30, 2017 · 2683 views
    This topic created in 3084 days ago, the information mentioned may be changed or developed.
    如题,taulate,terminaltables,texttable 小弟都用过,但是比较郁闷的就是当我输出中文的时候,排版会移位(应该是因为中文占 2 字节的事儿…)
    请问各位知道哪个 ascii table 包可以正常排版中文的么,谢谢大家
    1 replies    2017-12-31 09:33:18 +08:00
    gnaggnoyil
        1
    gnaggnoyil  
       Dec 31, 2017
    code point 和占的字节没有关系.输出中文的排版混乱也和 ascii table 本身没有关系

    你要做的就是给自己的 terminal 设置一个等宽 CJK 字体,比如文泉驿等宽微米黑.
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5714 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 56ms · UTC 03:26 · PVG 11:26 · LAX 20:26 · JFK 23:26
    ♥ Do have faith in what you're doing.