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

大家觉得几年内能够比较舒服地在Python3.3+下写Web应用?

  •  
  •   hustlzp ·
    hustlzp · 2013-08-27 10:15:09 +08:00 · 7151 次点击
    这是一个创建于 3897 天前的主题,其中的信息可能已经有所发展或是发生改变。
    目前貌似只有少数框架和库port到Python3了,其他的还是蛮缓慢。

    RT.
    22 条回复    1970-01-01 08:00:00 +08:00
    Muninn
        1
    Muninn  
       2013-08-27 10:51:20 +08:00
    今年已经有很多历史性的进步了
    明年应该差不多了
    yopming
        2
    yopming  
       2013-08-27 11:22:33 +08:00
    框架可以用3了,比如Flask,但是Flask的插件略多,好多都不行...
    ushuz
        3
    ushuz  
       2013-08-27 13:31:02 +08:00
    3.5 以后吧
    ushuz
        4
    ushuz  
       2013-08-27 13:32:39 +08:00
    当初要是一点儿一点儿迁移,5年,怎么都迁移到3上了。
    kk71
        5
    kk71  
       2013-08-27 13:59:47 +08:00
    django上可以了。
    flask感觉插件还没跟上,不过应该很快的。
    倒是觉得py3还不够稳定。比如3.2和3.3差别就比较明显
    hustlzp
        6
    hustlzp  
    OP
       2013-08-27 14:46:31 +08:00
    @Muninn
    @yopming
    @ushuz
    @ushuz
    @kk71 恩,希望1年之后能够实现吧~
    fwee
        7
    fwee  
       2013-08-27 15:04:06 +08:00
    等有4的时候
    hustlzp
        8
    hustlzp  
    OP
       2013-08-27 15:10:38 +08:00
    @fwee 有道理,3出来用2,4出来用3,5出来用4...
    0bit
        9
    0bit  
       2013-08-27 16:42:59 +08:00   ❤️ 1
    https://python3wos.appspot.com/

    等这个能达到150以上吧
    wwqgtxx
        10
    wwqgtxx  
       2013-08-27 17:46:51 +08:00 via Android
    等呀等,等呀等
    detailyang
        11
    detailyang  
       2013-08-27 20:35:43 +08:00
    不急 嘿嘿
    phuslu
        12
    phuslu  
       2013-08-27 20:38:07 +08:00
    goagent 缩回到 python 2.7 了, 最主要的原因是移动平台还没有 python 3 系列的移植,第三方库也是一大原因。
    derek80
        13
    derek80  
       2013-08-27 20:38:52 +08:00
    还是偶尔碰到只支持2.*的库。
    hustlzp
        14
    hustlzp  
    OP
       2013-08-27 21:33:30 +08:00
    @wwqgtxx
    @detailyang 恩,现在完全没看3的特性,只看2.7就好。
    aggron
        15
    aggron  
       2013-08-28 09:04:02 +08:00
    Web应用?现在就很方便用python3了,很多常用的库已经在使用six同时兼容python2和python3
    jianghu52
        16
    jianghu52  
       2013-08-28 09:14:21 +08:00
    主要是python3 跟数据库之间的插件还不够好。我本来想用djngo1.5+python3的,后来发现连接数据库的插件不支持python3.最后还是djngo1.4+python2.7了
    wwqgtxx
        17
    wwqgtxx  
       2013-08-28 11:28:29 +08:00 via Android
    各种类库不兼容,比如gevent
    yakczh
        18
    yakczh  
       2013-08-28 15:52:16 +08:00
    easy_install web.py

    ...

    ImportError: No module named utils
    yakczh
        19
    yakczh  
       2013-08-28 15:55:43 +08:00
    easy_install.exe utils
    ....

    ImportError: No module named db

    easy_install.exe db
    ...
    File "g:\Python32\lib\site-packages\setuptools\command\easy_install.py", line 1069, in run_setup
    run_setup(setup_script, args)
    File "g:\Python32\lib\site-packages\setuptools\sandbox.py", line 69, in run_setup
    lambda: execfile(
    File "g:\Python32\lib\site-packages\setuptools\sandbox.py", line 120, in run
    return func()
    File "g:\Python32\lib\site-packages\setuptools\sandbox.py", line 71, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'}
    File "g:\Python32\lib\site-packages\setuptools\compat.py", line 92, in execfile
    exec_(compile(source, fn, 'exec'), globs, locs)
    File "setup.py", line 14
    except IOError, e:
    ^
    SyntaxError: invalid syntax
    wwqgtxx
        20
    wwqgtxx  
       2013-08-28 16:33:47 +08:00 via Android
    @yakczh 用pip试试?
    VYSE
        21
    VYSE  
       2013-08-28 16:39:10 +08:00
    尝试切换到3,但发现除非废弃现有2的代码,不然两种之间切换想死的心都有。
    yakczh
        22
    yakczh  
       2013-08-28 16:39:54 +08:00
    @wwqgtxx Downloading/unpacking antiorm (from db)
    Downloading antiorm-1.1.1.tar.gz (162kB): 162kB downloaded
    Running setup.py egg_info for package antiorm
    Traceback (most recent call last):
    File "<string>", line 16, in <module>
    File "d:\temp\pip_build\antiorm\setup.py", line 14
    except IOError, e:
    ^
    SyntaxError: invalid syntax
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

    File "<string>", line 16, in <module>

    File "d:\temp\pip_build\antiorm\setup.py", line 14

    except IOError, e:

    ^

    SyntaxError: invalid syntax

    ----------------------------------------
    Cleaning up...
    Command python setup.py egg_info failed with error code 1 in d:\temp\pip_build_caizh\antiorm
    Storing complete log in C:\Users\xxx\pip\pip.log
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5423 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 103ms · UTC 09:08 · PVG 17:08 · LAX 02:08 · JFK 05:08
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.