blob: f04c3ec3926f58e507ef0922bf00cca04631997e [file] [log] [blame]
Georg Brandl8ec7f652007-08-15 14:28:01 +00001.. _tkinter:
2
3*********************************
4Graphical User Interfaces with Tk
5*********************************
6
7.. index::
8 single: GUI
9 single: Graphical User Interface
10 single: Tkinter
11 single: Tk
12
13Tk/Tcl has long been an integral part of Python. It provides a robust and
14platform independent windowing toolkit, that is available to Python programmers
Guilherme Polocda93aa2009-01-28 13:09:03 +000015using the :mod:`Tkinter` module, and its extensions, the :mod:`Tix` and
16the :mod:`ttk` modules.
Georg Brandl8ec7f652007-08-15 14:28:01 +000017
Georg Brandl6634bf22008-05-20 07:13:37 +000018The :mod:`Tkinter` module is a thin object-oriented layer on top of Tcl/Tk. To
19use :mod:`Tkinter`, you don't need to write Tcl code, but you will need to
Georg Brandl8ec7f652007-08-15 14:28:01 +000020consult the Tk documentation, and occasionally the Tcl documentation.
Georg Brandl6634bf22008-05-20 07:13:37 +000021:mod:`Tkinter` is a set of wrappers that implement the Tk widgets as Python
Georg Brandl8ec7f652007-08-15 14:28:01 +000022classes. In addition, the internal module :mod:`_tkinter` provides a threadsafe
23mechanism which allows Python and Tcl to interact.
24
Georg Brandl6634bf22008-05-20 07:13:37 +000025:mod:`Tkinter`'s chief virtues are that it is fast, and that it usually comes
Georg Brandlc62ef8b2009-01-03 20:55:06 +000026bundled with Python. Although its standard documentation is weak, good
27material is available, which includes: references, tutorials, a book and
28others. :mod:`Tkinter` is also famous for having an outdated look and feel,
29which has been vastly improved in Tk 8.5. Nevertheless, there are many other
30GUI libraries that you could be interested in. For more information about
Georg Brandlae98f502008-05-11 14:56:04 +000031alternatives, see the :ref:`other-gui-packages` section.
Georg Brandl8ec7f652007-08-15 14:28:01 +000032
33.. toctree::
Georg Brandlc62ef8b2009-01-03 20:55:06 +000034
Georg Brandl8ec7f652007-08-15 14:28:01 +000035 tkinter.rst
Guilherme Polocda93aa2009-01-28 13:09:03 +000036 ttk.rst
Georg Brandl6634bf22008-05-20 07:13:37 +000037 tix.rst
38 scrolledtext.rst
39 turtle.rst
Georg Brandl8ec7f652007-08-15 14:28:01 +000040 idle.rst
41 othergui.rst
42
Georg Brandlb19be572007-12-29 10:57:00 +000043.. Other sections I have in mind are
44 Tkinter internals
45 Freezing Tkinter applications
Georg Brandl8ec7f652007-08-15 14:28:01 +000046
47