Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Doc/faq/gui.rst

    r2 r391  
    55==========================
    66
    7 .. contents::
     7.. only:: html
    88
    9 General GUI Questions
    10 =====================
     9   .. contents::
    1110
    1211What platform-independent GUI toolkits exist for Python?
    13 --------------------------------------------------------
     12========================================================
    1413
    1514Depending on what platform(s) you are aiming at, there are several.
     
    1817
    1918Tkinter
    20 '''''''
     19-------
    2120
    2221Standard builds of Python include an object-oriented interface to the Tcl/Tk
     
    2726
    2827wxWidgets
    29 '''''''''
     28---------
    3029
    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>`__.
     30wxWidgets (http://www.wxwidgets.org) is a free, portable GUI class
     31library written in C++ that provides a native look and feel on a
     32number of platforms, with Windows, MacOS X, GTK, X11, all listed as
     33current stable targets.  Language bindings are available for a number
     34of languages including Python, Perl, Ruby, etc.
    3435
    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.
     36wxPython (http://www.wxpython.org) is the Python binding for
     37wxwidgets.  While it often lags slightly behind the official wxWidgets
     38releases, it also offers a number of features via pure Python
     39extensions that are not available in other language bindings.  There
     40is an active wxPython user and developer community.
    3941
    40 wxWidgets supports Windows and MacOS; on Unix variants,
    41 it supports both GTk+ and Motif toolkits.
     42Both wxWidgets and wxPython are free, open source, software with
     43permissive licences that allow their use in commercial products as
     44well as in freeware or shareware.
     45
    4246
    4347Qt
    44 '''
     48---
    4549
    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>`_.
     50There 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>`_).
     53PyQt 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>`_
     55if you want to write proprietary applications.  PySide is free for all applications.
     56
     57Qt 4.5 upwards is licensed under the LGPL license; also, commercial licenses
     58are available from `Nokia <http://qt.nokia.com/>`_.
    5359
    5460Gtk+
    55 ''''
     61----
    5662
    5763PyGtk bindings for the `Gtk+ toolkit <http://www.gtk.org>`_ have been
     
    5965
    6066FLTK
    61 ''''
     67----
    6268
    6369Python bindings for `the FLTK toolkit <http://www.fltk.org>`_, a simple yet
     
    6773
    6874FOX
    69 '''
     75----
    7076
    7177A wrapper for `the FOX toolkit <http://www.fox-toolkit.org/>`_ called `FXpy
     
    7581
    7682OpenGL
    77 ''''''
     83------
    7884
    7985For OpenGL bindings, see `PyOpenGL <http://pyopengl.sourceforge.net>`_.
     
    8187
    8288What platform-specific GUI toolkits exist for Python?
    83 -----------------------------------------------------
     89========================================================
    8490
    8591`The Mac port <http://python.org/download/mac>`_ by Jack Jansen has a rich and
     
    116122
    117123Build Tix with SAM enabled, perform the appropriate call to
    118 :cfunc:`Tclsam_init`, etc. inside Python's
     124:c:func:`Tclsam_init`, etc. inside Python's
    119125:file:`Modules/tkappinit.c`, and link with libtclsam and libtksam (you
    120126might include the Tix libraries as well).
     
    125131
    126132Yes, 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 :cfunc:`XtAddInput()` call, which allows you
     133code a bit.  Tk has the equivalent of Xt's :c:func:`XtAddInput()` call, which allows you
    128134to register a callback function which will be called from the Tk mainloop when
    129135I/O is possible on a file descriptor.  Here's what you need::
Note: See TracChangeset for help on using the changeset viewer.