blob: a14b3edb5c53f4af39559e438205554a083b60f3 [file] [log] [blame]
Georg Brandl116aa622007-08-15 14:28:22 +00001.. _other-gui-packages:
2
3Other Graphical User Interface Packages
4=======================================
5
Georg Brandlac6060c2008-05-17 18:44:45 +00006There are an number of extension widget sets to :mod:`tkinter`.
Georg Brandl116aa622007-08-15 14:28:22 +00007
Georg Brandl116aa622007-08-15 14:28:22 +00008.. seealso::
9
10 `Python megawidgets <http://pmw.sourceforge.net/>`_
11 is a toolkit for building high-level compound widgets in Python using the
Georg Brandlac6060c2008-05-17 18:44:45 +000012 :mod:`tkinter` package. It consists of a set of base classes and a library of
Georg Brandl116aa622007-08-15 14:28:22 +000013 flexible and extensible megawidgets built on this foundation. These megawidgets
14 include notebooks, comboboxes, selection widgets, paned widgets, scrolled
15 widgets, dialog windows, etc. Also, with the Pmw.Blt interface to BLT, the
16 busy, graph, stripchart, tabset and vector commands are be available.
17
18 The initial ideas for Pmw were taken from the Tk ``itcl`` extensions ``[incr
19 Tk]`` by Michael McLennan and ``[incr Widgets]`` by Mark Ulferts. Several of the
20 megawidgets are direct translations from the itcl to Python. It offers most of
21 the range of widgets that ``[incr Widgets]`` does, and is almost as complete as
22 Tix, lacking however Tix's fast :class:`HList` widget for drawing trees.
23
24 `Tkinter3000 Widget Construction Kit (WCK) <http://tkinter.effbot.org/>`_
25 is a library that allows you to write new Tkinter widgets in pure Python. The
26 WCK framework gives you full control over widget creation, configuration, screen
27 appearance, and event handling. WCK widgets can be very fast and light-weight,
28 since they can operate directly on Python data structures, without having to
29 transfer data through the Tk/Tcl layer.
30
Georg Brandl116aa622007-08-15 14:28:22 +000031
32The major cross-platform (Windows, Mac OS X, Unix-like) GUI toolkits that are
33also available for Python:
34
Georg Brandl116aa622007-08-15 14:28:22 +000035.. seealso::
36
Antoine Pitrou7462e872011-12-03 20:59:24 +010037 `PyGObject <https://live.gnome.org/PyGObject>`_
38 provides introspection bindings for C libraries using
39 `GObject <http://developer.gnome.org/gobject/stable/>`_. One of
40 these libraries is the `GTK+ 3 <http://www.gtk.org/>`_ widget set.
41 GTK+ comes with many more widgets than Tkinter provides. An online
42 `Python GTK+ 3 Tutorial <http://python-gtk-3-tutorial.readthedocs.org/en/latest/>`_
43 is available.
44
45 `PyGTK <http://www.pygtk.org/>`_ provides bindings for an older version
46 of the library, GTK+ 2. It provides an object oriented interface that
47 is slightly higher level than the C one. There are also bindings to
Christian Heimesdd15f6c2008-03-16 00:07:10 +000048 `GNOME <http://www.gnome.org>`_. One well known PyGTK application is
49 `PythonCAD <http://www.pythoncad.org/>`_. An online `tutorial
50 <http://www.pygtk.org/pygtk2tutorial/index.html>`_ is available.
Georg Brandl116aa622007-08-15 14:28:22 +000051
Georg Brandl495f7b52009-10-27 15:28:25 +000052 `PyQt <http://www.riverbankcomputing.co.uk/software/pyqt/>`_
Georg Brandl116aa622007-08-15 14:28:22 +000053 PyQt is a :program:`sip`\ -wrapped binding to the Qt toolkit. Qt is an
54 extensive C++ GUI application development framework that is
55 available for Unix, Windows and Mac OS X. :program:`sip` is a tool
56 for generating bindings for C++ libraries as Python classes, and
57 is specifically designed for Python. The *PyQt3* bindings have a
58 book, `GUI Programming with Python: QT Edition
59 <http://www.commandprompt.com/community/pyqt/>`_ by Boudewijn
60 Rempt. The *PyQt4* bindings also have a book, `Rapid GUI Programming
61 with Python and Qt <http://www.qtrac.eu/pyqtbook.html>`_, by Mark
62 Summerfield.
63
Antoine Pitrou5dd95d62011-12-03 21:07:01 +010064 `PySide <http://www.pyside.org/>`_
65 is a newer binding to the Qt toolkit, provided by Nokia.
66 Compared to PyQt, its licensing scheme is friendlier to non-open source
67 applications.
68
Georg Brandl116aa622007-08-15 14:28:22 +000069 `wxPython <http://www.wxpython.org>`_
70 wxPython is a cross-platform GUI toolkit for Python that is built around
71 the popular `wxWidgets <http://www.wxwidgets.org/>`_ (formerly wxWindows)
Christian Heimes2c181612007-12-17 20:04:13 +000072 C++ toolkit. It provides a native look and feel for applications on
Georg Brandl116aa622007-08-15 14:28:22 +000073 Windows, Mac OS X, and Unix systems by using each platform's native
Christian Heimes2c181612007-12-17 20:04:13 +000074 widgets where ever possible, (GTK+ on Unix-like systems). In addition to
Georg Brandl116aa622007-08-15 14:28:22 +000075 an extensive set of widgets, wxPython provides classes for online
76 documentation and context sensitive help, printing, HTML viewing,
77 low-level device context drawing, drag and drop, system clipboard access,
78 an XML-based resource format and more, including an ever growing library
Christian Heimes2c181612007-12-17 20:04:13 +000079 of user-contributed modules. wxPython has a book, `wxPython in Action
Georg Brandl116aa622007-08-15 14:28:22 +000080 <http://www.amazon.com/exec/obidos/ASIN/1932394621>`_, by Noel Rappin and
81 Robin Dunn.
82
Alexandre Vassalotti8ae3e052008-05-16 00:41:41 +000083PyGTK, PyQt, and wxPython, all have a modern look and feel and more
Georg Brandl48310cd2009-01-03 21:18:54 +000084widgets than Tkinter. In addition, there are many other GUI toolkits for
Alexandre Vassalotti8ae3e052008-05-16 00:41:41 +000085Python, both cross-platform, and platform-specific. See the `GUI Programming
Georg Brandl116aa622007-08-15 14:28:22 +000086<http://wiki.python.org/moin/GuiProgramming>`_ page in the Python Wiki for a
87much more complete list, and also for links to documents where the
88different GUI toolkits are compared.
89