Skip to content

Commit 1de7f35

Browse files
committed
1. Architecture -- Tkinter modules
1 parent e68e136 commit 1de7f35

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

Doc/library/tkinter.rst

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,9 @@ Tcl
4444
an interface to the Tk toolkit. The Tcl engine library has a C interface to
4545
create and operate interpreter instances, run Tcl commands and scripts with
4646
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
5150
commands.
5251

5352
Tk
@@ -70,12 +69,20 @@ Tix
7069

7170

7271
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.
7477

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.
7986
It is usually a shared library (or DLL), but might in some cases be statically
8087
linked with the Python interpreter.
8188

@@ -90,6 +97,9 @@ Or, more often::
9097

9198
from tkinter import *
9299

100+
101+
Module contents
102+
---------------
93103

94104
.. class:: Tk(screenName=None, baseName=None, className='Tk', useTk=1)
95105

0 commit comments

Comments
 (0)