推荐学习书目
› 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
Livid
396.81D
539.24D
V2EX  ›  Python

大家有试过用 Python 3 运行 production 网站么?

  •  
  •   Livid ·
    PRO
    · Oct 13, 2011 · 5788 views
    This topic created in 5461 days ago, the information mentioned may be changed or developed.
    话说目前 Python 2.x 里最让我无语的就是 str 和 unicode 的差别。尤其是对于 Workspace 这样支持 i18n 的项目。
    5 replies  •  1970-01-01 08:00:00 +08:00
    harmy
        1
    harmy  
       Oct 13, 2011
    这也是目前让我有点升级动力的地方,但还是观望中。
    muxi
        2
    muxi  
       Oct 13, 2011
    暂时还在观望中,毕竟没有太多的包支持,string 和 unicode,让我曾经把英语站翻译成德语的时候也崩溃了好长时间,唉……
    lepture
        3
    lepture  
       Oct 13, 2011
    PIL 还不支持 python3 。 有代替库否?
    Livid
        4
    Livid  
    MOD
    OP
    PRO
       Oct 13, 2011
    @lepture 简单的处理用 ImageMagick 的 cli 也是可以搞定的。
    ayanamist
        5
    ayanamist  
       Oct 13, 2011
    根本没有那么复杂,你要是实在很在意,就在启动脚本那里添加一句
    from __future__ import unicode_literals
    所有的str都会当成unicode来处理。不过还是要考虑性能问题以及某些只接受str的
    http://docs.python.org/library/__future__.html
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   818 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 21:18 · PVG 05:18 · LAX 14:18 · JFK 17:18
    ♥ Do have faith in what you're doing.