@@ -105,23 +105,13 @@ Tix
105
105
Tkinter Modules
106
106
---------------
107
107
108
- Most of the time, :mod: `tkinter ` is all you really need, but a number of
109
- additional modules are available as well. The Tk interface is located in a
110
- binary module named :mod: `_tkinter `. This module contains the low-level
111
- interface to Tk, and should never be used directly by application programmers.
112
- It is usually a shared library (or DLL), but might in some cases be statically
113
- linked with the Python interpreter.
114
-
115
- In addition to the Tk interface module, :mod: `tkinter ` includes a number of
116
- Python modules, :mod: `tkinter.constants ` being one of the most important.
117
- Importing :mod: `tkinter ` will automatically import :mod: `tkinter.constants `,
118
- so, usually, to use Tkinter all you need is a simple import statement::
108
+ Support for Tkinter is spread across several modules. Most applications will need the
109
+ main :mod: `tkinter ` module, as well as the :mod: `tkinter.ttk ` module, which provides
110
+ the modern themed widget set and API::
119
111
120
- import tkinter
121
-
122
- Or, more often::
123
112
124
113
from tkinter import *
114
+ from tkinter import ttk
125
115
126
116
127
117
.. class :: Tk(screenName=None, baseName=None, className='Tk', useTk=1)
@@ -144,7 +134,10 @@ Or, more often::
144
134
subsystem initialized) by calling its :meth: `loadtk ` method.
145
135
146
136
147
- Other modules that provide Tk support include:
137
+ The modules that provide Tk support include:
138
+
139
+ :mod: `tkinter `
140
+ Main Tkinter module.
148
141
149
142
:mod: `tkinter.colorchooser `
150
143
Dialog to let the user choose a color.
@@ -167,9 +160,35 @@ Other modules that provide Tk support include:
167
160
:mod: `tkinter.simpledialog `
168
161
Basic dialogs and convenience functions.
169
162
163
+ :mod: `tkinter.ttk `
164
+ Themed widget set introduced in Tk 8.5, providing modern alternatives
165
+ for many of the classic widgets in the main :mod: `tkinter ` module.
166
+
167
+ Additional modules:
168
+
169
+ :mod: `_tkinter `
170
+ A binary module that contains the low-level interface to Tcl/Tk.
171
+ It is automatically imported by the main :mod: `tkinter ` module,
172
+ and should never be used directly by application programmers.
173
+ It is usually a shared library (or DLL), but might in some cases be
174
+ statically linked with the Python interpreter.
175
+
176
+ :mod: `idlelib `
177
+ Python's Integrated Development and Learning Environment (IDLE). Based
178
+ on :mod: `tkinter `.
179
+
180
+ :mod: `tkinter.constants `
181
+ Symbolic constants that can be used in place of strings when passing
182
+ various parameters to Tkinter calls. Automatically imported by the
183
+ main :mod: `tkinter ` module.
184
+
170
185
:mod: `tkinter.dnd `
171
- Drag-and-drop support for :mod: `tkinter `. This is experimental and should
172
- become deprecated when it is replaced with the Tk DND.
186
+ (experimental) Drag-and-drop support for :mod: `tkinter `. This will
187
+ become deprecated when it is replaced with the Tk DND.
188
+
189
+ :mod: `tkinter.tix `
190
+ (deprecated) An older third-party Tcl/Tk package that adds several new
191
+ widgets. Better alternatives for most can be found in :mod: `tkinter.ttk `.
173
192
174
193
:mod: `turtle `
175
194
Turtle graphics in a Tk window.
0 commit comments