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

Py 的图形界面开发,哪个包好些?

  •  
  •   chu1337 ·
    Q2h1Cg · May 27, 2013 · 7320 views
    This topic created in 4736 days ago, the information mentioned may be changed or developed.
    py 用了一段时间了,但是一直都没做过图形界面,不知道哪个包好些?
    最好是可以可视化的~
    26 replies    1970-01-01 08:00:00 +08:00
    RelativeLayout
        1
    RelativeLayout  
       May 27, 2013   ❤️ 2
    chon
        2
    chon  
       May 27, 2013   ❤️ 1
    没用py开发过图形界面,但是看很多人用PyQt
    likai
        3
    likai  
       May 27, 2013 via Android
    pyqt
    Golevka
        4
    Golevka  
       May 27, 2013
    只用过Tk的路过, 并表示Tk好难用
    davepkxxx
        5
    davepkxxx  
       May 27, 2013
    我一般都开发console程序,不过看到很多人推荐qt
    passluo
        6
    passluo  
       May 27, 2013
    WXwidgets ?
    thedevil5032
        7
    thedevil5032  
       May 27, 2013   ❤️ 1
    只用过 PyQt,觉得上手比较容易。
    编程大致过程:看例子,根据需求由 class 名选择 class,看 class 文档,写代码实验。
    界面写起来很方便。
    (我的 github 上有几个简单的应用,请随意参观,欢迎建议和问题)

    关于 PyQt 和 PySide 的比较: http://stackoverflow.com/questions/1297660/pyside-vs-pyqt

    ====
    class 文档:
    这个似乎上不去了, http://pyqt.sourceforge.net/Docs/PyQt4/classes.html
    两个的内容应该是一样的, http://qt-project.org/doc/qt-4.8/classes.html

    虽然是针对 C++ 写的文档,但无论是函数名,method 在 Python 下都是一样的。
    yaotian
        8
    yaotian  
       May 27, 2013
    @RelativeLayout 这个能被真正用到项目中吗?
    yangguang
        9
    yangguang  
       May 27, 2013
    只用过wxPython,配合Boa Constructor感觉还是很简单,可以实现拖拽的。
    chu1337
        10
    chu1337  
    OP
       May 27, 2013
    @thedevil5032 很多人推荐pyqt 哈...
    还有个问题,网上貌似没有很详细的书籍或教程,只有官方的文档(还是英文的...),有什么好的可以推荐么~
    chchwy
        11
    chchwy  
       May 27, 2013
    PyQt教程: http://zetcode.com/tutorials/pyqt4/

    中文就別想了,這目前還算小眾技術。
    thedevil5032
        12
    thedevil5032  
       May 27, 2013
    @chuhades 其实根据我自己的经验, PyQt 编程的学习方法主要是看代码和文档,特别是官方的英文文档。
    推荐书籍: Rapid GUI Programming with Python and PyQt. 附带很多例子, http://www.qtrac.eu/pyqtbook.html。

    ps. 很多人都会跟你说,做编程英语很重要。
    chu1337
        13
    chu1337  
    OP
       May 27, 2013
    @chchwy thx...
    chu1337
        14
    chu1337  
    OP
       May 27, 2013
    @thedevil5032 囧.. 我英语扔了将近一年了,尽力捡起来..
    shiweifu
        15
    shiweifu  
       May 27, 2013
    推荐tk
    chu1337
        16
    chu1337  
    OP
       May 27, 2013
    @shiweifu 看过几眼tk,感觉用它很折磨...
    RelativeLayout
        17
    RelativeLayout  
       May 27, 2013
    @yaotian 当然可以啊,你可以看他的demo,很完善的框架。
    xuelang
        18
    xuelang  
       May 27, 2013
    可以试下wxPython
    yaotian
        19
    yaotian  
       May 27, 2013
    @xuelang 具体在自己的项目中实践过吗? 例子总归是例子。我对这很感兴趣,想用到项目中,怕到一半做不下去了。
    meta
        20
    meta  
       May 27, 2013
    现在的图形界面不都是直接webkit了么。
    xuelang
        21
    xuelang  
       May 27, 2013
    loveshouhu
        22
    loveshouhu  
       May 27, 2013
    目测Qt还不错。。
    mckelvin
        23
    mckelvin  
       May 28, 2013
    PyQt很方便,可以用QtDesigner拖拖拉拉设计好界面,由ui文件直接生成对应的python GUI代码。

    https://github.com/mckelvin/doubanfm-for-linux 是我用PyQt写的豆瓣FM客户端
    chu1337
        24
    chu1337  
    OP
       May 28, 2013
    @mckelvin 看上去不错~
    ygmpkk
        25
    ygmpkk  
       May 28, 2013
    gully
        26
    gully  
       Jun 2, 2013
    wxPython很好用,社区支持也很好
    http://groups.google.com/group/wxpython-users
    wxPython的作者Robin基本上有问必答


    我使用好几年了,开发了几个公司内部使用的工具.开发和维护的效率都非常高.
    开源了其中的一个hex编辑器组件:
    https://github.com/deepgully/codes/tree/master/hexeditor

    PS. 强烈推荐使用sizer布局
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2908 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 65ms · UTC 12:02 · PVG 20:02 · LAX 05:02 · JFK 08:02
    ♥ Do have faith in what you're doing.