V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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
ioven
V2EX  ›  Python

scrapy 输出乱码是怎么回事?

  •  
  •   ioven · 2015-12-22 12:59:58 +08:00 · 2462 次点击
    这是一个创建于 3047 天前的主题,其中的信息可能已经有所发展或是发生改变。
    >>> from scrapy.utils import display
    >>> display.pprint(123456)
    [34m123456 [39;49;00m


    虽然不影响运行但看起来很不舒服
    5 条回复    2015-12-22 17:02:14 +08:00
    wlsnx
        1
    wlsnx  
       2015-12-22 14:03:05 +08:00
    windows ?
    oott123
        2
    oott123  
       2015-12-22 14:28:13 +08:00 via Android
    这好像是颜色
    换 bash
    ioven
        3
    ioven  
    OP
       2015-12-22 16:42:04 +08:00
    @wlsnx @oott123
    win7, 用 powershell 执行也是这样

    修改代码去掉颜色设置可以正常显示

    想了解有没有更好的方式
    oott123
        4
    oott123  
       2015-12-22 16:49:13 +08:00
    @ioven 用 git bash 或者 babun
    ioven
        5
    ioven  
    OP
       2015-12-22 17:02:14 +08:00
    @oott123 babun 貌似很给力,试试看
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4851 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 09:49 · PVG 17:49 · LAX 02:49 · JFK 05:49
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.