16. Graphical User Interfaces with Tk
Tk/Tcl has long been an integral part of Python. It provides a robust and platform
independent windowing toolkit, that is available to Python programmers using the Tkinter module, and its extension, the Tix module.
The Tkinter module is a thin
object-oriented layer on top of Tcl/Tk. To use Tkinter, you don't need to write Tcl code, but you will
need to consult the Tk documentation, and occasionally the Tcl documentation. Tkinter is a set of wrappers that
implement the Tk widgets as Python classes. In addition, the internal module _tkinter provides a threadsafe mechanism which allows Python and Tcl to
Tk is not the only GUI for Python, but is however the most commonly used one; see section
, ``Other User Interface Modules and Packages,'' for more information on other GUI
toolkits for Python.
||Interface to Tcl/Tk for graphical user interfaces
||Tk Extension Widgets for Tkinter
||Text widget with a vertical scroll bar.
||An environment for turtle graphics.