blob: 56f52654141a6f5d1893f5cf8fabc3e6d93cbd82 [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
Georg Brandlc21cd7e2008-05-16 17:37:53 +000015using the :mod:`tkinter` package, and its extension, the :mod:`tkinter.tix`
16module.
Georg Brandl8ec7f652007-08-15 14:28:01 +000017
Georg Brandlc21cd7e2008-05-16 17:37:53 +000018The :mod:`tkinter` package 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 Brandlc21cd7e2008-05-16 17:37:53 +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 Brandlc21cd7e2008-05-16 17:37:53 +000025:mod:`tkinter`'s chief virtues are that it is fast, and that it usually comes
Georg Brandlae98f502008-05-11 14:56:04 +000026bundled with Python. Although its standard documentation is weak, good
27material is available, which includes: references, tutorials, a book and
Georg Brandlc21cd7e2008-05-16 17:37:53 +000028others. :mod:`tkinter` is also famous for having an outdated look and feel,
Georg Brandlae98f502008-05-11 14:56:04 +000029which 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
31alternatives, see the :ref:`other-gui-packages` section.
Georg Brandl8ec7f652007-08-15 14:28:01 +000032
33.. toctree::
34
35 tkinter.rst
Georg Brandlc21cd7e2008-05-16 17:37:53 +000036 tkinter.tix.rst
37 tkinter.scrolledtext.rst
38 tkinter.turtle.rst
Georg Brandl8ec7f652007-08-15 14:28:01 +000039 idle.rst
40 othergui.rst
41
Georg Brandlb19be572007-12-29 10:57:00 +000042.. Other sections I have in mind are
43 Tkinter internals
44 Freezing Tkinter applications
Georg Brandl8ec7f652007-08-15 14:28:01 +000045
46