44
44
an interface to the Tk toolkit. The Tcl engine library has a C interface to
45
45
create and operate interpreter instances, run Tcl commands and scripts with
46
46
them and add custom commands that can be implemented in either Tcl or C.
47
- It also implements a per-interpreter event queue. An interpreter
48
- instance has a single stream of execution. Each :class: `Tk ` object embeds
49
- its own interpreter instance. Though :mod: `_tkinter ` allows to
50
- execute entire Tcl scripts, the Python bindings typically only invoke single
47
+ It also implements a per-interpreter event queue. Each :class: `Tk ` object
48
+ embeds its own interpreter instance. Though :mod: `_tkinter ` allows to
49
+ execute entire Tcl scripts, the Python bindings typically only run single
51
50
commands.
52
51
53
52
Tk
70
69
71
70
72
71
Tkinter Modules
73
- ---------------
72
+ ^^^^^^^^^^^^^^^
73
+
74
+ :mod: `tkinter ` has the core functionality and the regular Tk widgets.
75
+ Unless you're using the additional widgets, this will be all
76
+ that you really need.
74
77
75
- Most of the time, :mod: `tkinter ` is all you really need, but a number of
76
- additional modules are available as well. The Tk interface is located in a
77
- binary module named :mod: `_tkinter `. This module contains the low-level
78
- interface to Tk, and should never be used directly by application programmers.
78
+ :mod: `tkinter.ttk ` and :mod: `tkinter.tix ` have classes for extra
79
+ widgets from those families. Ttk is intended to be the new standard widget
80
+ set with a more modern look, but as of this writing, it doesn't yet have
81
+ replacements for all the classical widgets.
82
+
83
+ The Tk interface is located in a C module named :mod: `_tkinter `.
84
+ This module directly interfaces with Tcl/Tk via their C interfaces and
85
+ shouldn't be used directly by application programmers save for a few functions.
79
86
It is usually a shared library (or DLL), but might in some cases be statically
80
87
linked with the Python interpreter.
81
88
@@ -90,6 +97,9 @@ Or, more often::
90
97
91
98
from tkinter import *
92
99
100
+
101
+ Module contents
102
+ ---------------
93
103
94
104
.. class :: Tk(screenName=None, baseName=None, className='Tk', useTk=1)
95
105
0 commit comments