Changeset 391 for python/trunk/Doc/faq/gui.rst
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Doc/faq/gui.rst
r2 r391 5 5 ========================== 6 6 7 .. contents::7 .. only:: html 8 8 9 General GUI Questions 10 ===================== 9 .. contents:: 11 10 12 11 What platform-independent GUI toolkits exist for Python? 13 -------------------------------------------------------- 12 ======================================================== 14 13 15 14 Depending on what platform(s) you are aiming at, there are several. … … 18 17 19 18 Tkinter 20 ''''''' 19 ------- 21 20 22 21 Standard builds of Python include an object-oriented interface to the Tcl/Tk … … 27 26 28 27 wxWidgets 29 ''''''''' 28 --------- 30 29 31 wxWidgets is a GUI class library written in C++ that's a portable 32 interface to various platform-specific libraries, and that has a 33 Python interface called `wxPython <http://www.wxpython.org>`__. 30 wxWidgets (http://www.wxwidgets.org) is a free, portable GUI class 31 library written in C++ that provides a native look and feel on a 32 number of platforms, with Windows, MacOS X, GTK, X11, all listed as 33 current stable targets. Language bindings are available for a number 34 of languages including Python, Perl, Ruby, etc. 34 35 35 wxWidgets preserves the look and feel of the 36 underlying graphics toolkit, and has a large set of widgets and 37 collection of GDI classes. See `the wxWidgets page 38 <http://www.wxwidgets.org>`_ for more details. 36 wxPython (http://www.wxpython.org) is the Python binding for 37 wxwidgets. While it often lags slightly behind the official wxWidgets 38 releases, it also offers a number of features via pure Python 39 extensions that are not available in other language bindings. There 40 is an active wxPython user and developer community. 39 41 40 wxWidgets supports Windows and MacOS; on Unix variants, 41 it supports both GTk+ and Motif toolkits. 42 Both wxWidgets and wxPython are free, open source, software with 43 permissive licences that allow their use in commercial products as 44 well as in freeware or shareware. 45 42 46 43 47 Qt 44 ''' 48 --- 45 49 46 There are bindings available for the Qt toolkit (`PyQt 47 <http://www.riverbankcomputing.co.uk/software/pyqt/>`_) and for KDE (`PyKDE <http://www.riverbankcomputing.co.uk/software/pykde/intro>`__). If 48 you're writing open source software, you don't need to pay for PyQt, but if you 49 want to write proprietary applications, you must buy a PyQt license from 50 `Riverbank Computing <http://www.riverbankcomputing.co.uk>`_ and (up to Qt 4.4; 51 Qt 4.5 upwards is licensed under the LGPL license) a Qt license from `Trolltech 52 <http://www.trolltech.com>`_. 50 There are bindings available for the Qt toolkit (using either `PyQt 51 <http://www.riverbankcomputing.co.uk/software/pyqt/>`_ or `PySide 52 <http://www.pyside.org/>`_) and for KDE (`PyKDE <http://www.riverbankcomputing.co.uk/software/pykde/intro>`_). 53 PyQt is currently more mature than PySide, but you must buy a PyQt license from 54 `Riverbank Computing <http://www.riverbankcomputing.co.uk/software/pyqt/license>`_ 55 if you want to write proprietary applications. PySide is free for all applications. 56 57 Qt 4.5 upwards is licensed under the LGPL license; also, commercial licenses 58 are available from `Nokia <http://qt.nokia.com/>`_. 53 59 54 60 Gtk+ 55 '''' 61 ---- 56 62 57 63 PyGtk bindings for the `Gtk+ toolkit <http://www.gtk.org>`_ have been … … 59 65 60 66 FLTK 61 '''' 67 ---- 62 68 63 69 Python bindings for `the FLTK toolkit <http://www.fltk.org>`_, a simple yet … … 67 73 68 74 FOX 69 ''' 75 ---- 70 76 71 77 A wrapper for `the FOX toolkit <http://www.fox-toolkit.org/>`_ called `FXpy … … 75 81 76 82 OpenGL 77 '''''' 83 ------ 78 84 79 85 For OpenGL bindings, see `PyOpenGL <http://pyopengl.sourceforge.net>`_. … … 81 87 82 88 What platform-specific GUI toolkits exist for Python? 83 ----------------------------------------------------- 89 ======================================================== 84 90 85 91 `The Mac port <http://python.org/download/mac>`_ by Jack Jansen has a rich and … … 116 122 117 123 Build Tix with SAM enabled, perform the appropriate call to 118 :c func:`Tclsam_init`, etc. inside Python's124 :c:func:`Tclsam_init`, etc. inside Python's 119 125 :file:`Modules/tkappinit.c`, and link with libtclsam and libtksam (you 120 126 might include the Tix libraries as well). … … 125 131 126 132 Yes, and you don't even need threads! But you'll have to restructure your I/O 127 code a bit. Tk has the equivalent of Xt's :c func:`XtAddInput()` call, which allows you133 code a bit. Tk has the equivalent of Xt's :c:func:`XtAddInput()` call, which allows you 128 134 to register a callback function which will be called from the Tk mainloop when 129 135 I/O is possible on a file descriptor. Here's what you need::
Note:
See TracChangeset
for help on using the changeset viewer.