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
Livid
V2EX  ›  Python

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

  •  
  •   Livid · 2011-10-13 12:47:19 +08:00 · 4704 次点击
    这是一个创建于 4580 天前的主题,其中的信息可能已经有所发展或是发生改变。
    话说目前 Python 2.x 里最让我无语的就是 str 和 unicode 的差别。尤其是对于 Workspace 这样支持 i18n 的项目。
    5 条回复    1970-01-01 08:00:00 +08:00
    harmy
        1
    harmy  
       2011-10-13 13:04:26 +08:00
    这也是目前让我有点升级动力的地方,但还是观望中。
    muxi
        2
    muxi  
       2011-10-13 13:42:38 +08:00
    暂时还在观望中,毕竟没有太多的包支持,string 和 unicode,让我曾经把英语站翻译成德语的时候也崩溃了好长时间,唉……
    lepture
        3
    lepture  
       2011-10-13 13:45:32 +08:00
    PIL 还不支持 python3 。 有代替库否?
    Livid
        4
    Livid  
    MOD
    OP
       2011-10-13 13:58:35 +08:00
    @lepture 简单的处理用 ImageMagick 的 cli 也是可以搞定的。
    ayanamist
        5
    ayanamist  
       2011-10-13 20:29:59 +08:00
    根本没有那么复杂,你要是实在很在意,就在启动脚本那里添加一句
    from __future__ import unicode_literals
    所有的str都会当成unicode来处理。不过还是要考虑性能问题以及某些只接受str的
    http://docs.python.org/library/__future__.html
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5545 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 03:33 · PVG 11:33 · LAX 20:33 · JFK 23:33
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.