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

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

  •  
  •   Livid ·
    PRO
    · Oct 13, 2011 · 5922 views
    This topic created in 5509 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
    harmy
    Oct 13, 2011
    1
    这也是目前让我有点升级动力的地方,但还是观望中。
    muxi
    muxi
    Oct 13, 2011
    2
    暂时还在观望中,毕竟没有太多的包支持,string 和 unicode,让我曾经把英语站翻译成德语的时候也崩溃了好长时间,唉……
    lepture
    lepture
    Oct 13, 2011
    3
    PIL 还不支持 python3 。 有代替库否?
    Livid
    Livid
    MOD
    OP
    PRO
    Oct 13, 2011
    4
    @lepture 简单的处理用 ImageMagick 的 cli 也是可以搞定的。
    ayanamist
    ayanamist
    Oct 13, 2011
    5
    根本没有那么复杂,你要是实在很在意,就在启动脚本那里添加一句
    from __future__ import unicode_literals
    所有的str都会当成unicode来处理。不过还是要考虑性能问题以及某些只接受str的
    http://docs.python.org/library/__future__.html
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4794 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 06:18 · PVG 14:18 · LAX 22:18 · JFK 01:18
    ♥ Do have faith in what you're doing.