Lines Matching full:tcl
1 :mod:`tkinter` --- Python interface to Tcl/Tk
5 :synopsis: Interface to Tcl/Tk for graphical user interfaces
14 the Tcl/Tk GUI toolkit. Both Tk and :mod:`tkinter` are available on most Unix
19 properly installed on your system, and also showing what version of Tcl/Tk is
20 installed, so you can read the Tcl/Tk documentation specific to that version.
22 Tkinter supports a range of Tcl/Tk versions, built either with or
23 without thread support. The official Python binary release bundles Tcl/Tk 8.6
29 additions and changes, and refer to the official Tcl/Tk documentation for
34 Tcl/Tk 8.5 (2007) introduced a modern set of themed user interface components
48 Tcl/Tk Resources:
50 * `Tk commands <https://www.tcl.tk/man/tcl8.6/TkCmd/contents.htm>`_
51 Comprehensive reference to each of the underlying Tcl/Tk commands used by Tkinter.
53 * `Tcl/Tk Home Page <https://www.tcl.tk>`_
54 Additional documentation, and links to Tcl/Tk core development.
67 * `Tcl and the Tk Toolkit (2nd edition) <https://www.amazon.com/exec/obidos/ASIN/032133633X>`_
68 …By John Ousterhout, inventor of Tcl/Tk, and Ken Jones; does not cover Tkinter. (ISBN 978-032133633…
74 Tcl/Tk is not a single library but rather consists of a few distinct
79 Tcl
80 Tcl is a dynamic interpreted programming language, just like Python. Though
83 interface to the Tk toolkit. The Tcl library has a C interface to
84 create and manage one or more instances of a Tcl interpreter, run Tcl
86 implemented in either Tcl or C. Each interpreter has an event queue,
88 Unlike Python, Tcl's execution model is designed around cooperative
93 Tk is a `Tcl package <https://wiki.tcl-lang.org/37432>`_ implemented in C
95 :class:`Tk` object embeds its own Tcl interpreter instance with Tk loaded into
97 Tk uses Tcl's event queue to generate and process GUI events.
109 the :mod:`tkinter` module first assembles a Tcl/Tk command string. It passes that
110 Tcl command string to an internal :mod:`_tkinter` binary module, which then
111 calls the Tcl interpreter to evaluate it. The Tcl interpreter will then call into the
130 application, and initialize a Tcl interpreter for this widget. Each
131 instance has its own associated Tcl interpreter.
144 with which Tcl is invoked (*argv0* in *interp*).
146 If ``True``, initialize the Tk subsystem. The :func:`tkinter.Tcl() <Tcl>`
162 :file:`.{className}.tcl` and :file:`.{baseName}.tcl`, into the Tcl
171 provides access to the Tcl interpreter. Each widget that is attached
192 .. function:: Tcl(screenName=None, baseName=None, className='Tk', useTk=False)
194 The :func:`Tcl` function is a factory function which creates an object much like
196 subsystem. This is most often useful when driving the Tcl interpreter in an
199 created by the :func:`Tcl` object can have a Toplevel window created (and the Tk
236 A binary module that contains the low-level interface to Tcl/Tk.
256 (deprecated) An older third-party Tcl/Tk package that adds several new
274 find more detailed documentation on them, including in the official Tcl/Tk
298 which initializes Tk and creates its associated Tcl interpreter. It also
350 Understanding How Tkinter Wraps Tcl/Tk
354 is assembling strings representing Tcl/Tk commands, and executing those
355 commands in the Tcl interpreter attached to your applicaton's :class:`Tk`
361 what those underlying Tcl/Tk commands look like.
363 To illustrate, here is the Tcl/Tk equivalent of the main part of the Tkinter
374 Tcl's syntax is similar to many shell languages, where the first word is the
381 * Tcl widget options (like ``-text``) correspond to keyword arguments in
384 * Widgets are referred to by a *pathname* in Tcl (like ``.frm.btn``),
393 * Operations which are implemented as separate *commands* in Tcl (like
395 objects. As you'll see shortly, at other times Tcl uses what appear to be
408 across different versions of both Tkinter and Tcl/Tk. If you're searching
409 documentation, make sure it corresponds to the Python and Tcl/Tk versions
447 Navigating the Tcl/Tk Reference Manual
450 As noted, the official `Tk commands <https://www.tcl.tk/man/tcl8.6/TkCmd/contents.htm>`_
456 objects, you've seen that many Tcl/Tk operations appear as commands that
466 when you create a widget in Tcl/Tk, it creates a Tcl command with the name
476 In the official Tcl/Tk reference documentation, you'll find most operations
479 `ttk::button <https://www.tcl.tk/man/tcl8.6/TkCmd/ttk_button.htm>`_
482 `grid <https://www.tcl.tk/man/tcl8.6/TkCmd/grid.htm>`_).
485 `options <https://www.tcl.tk/man/tcl8.6/TkCmd/options.htm>`_ or
486 `ttk::widget <https://www.tcl.tk/man/tcl8.6/TkCmd/ttk_widget.htm>`_ man
492 `winfo <https://www.tcl.tk/man/tcl8.6/TkCmd/winfo.htm>`_ man page.
506 Python and Tcl/Tk have very different threading models, which :mod:`tkinter`
509 A Python interpreter may have many threads associated with it. In Tcl, multiple
510 threads can be created, but each thread has a separate Tcl interpreter instance
514 Each :class:`Tk` object created by :mod:`tkinter` contains a Tcl interpreter.
521 Tcl/Tk applications are normally event-driven, meaning that after initialization,
530 If the Tcl interpreter is not running the event loop and processing events, any
531 :mod:`tkinter` calls made from threads other than the one running the Tcl
536 * Tcl/Tk libraries can be built so they are not thread-aware. In this case,
538 if this is different than the thread that created the Tcl interpreter. A global
545 them in separate threads and ensure you're running a thread-aware Tcl/Tk build.
547 * Blocking event handlers are not the only way to prevent the Tcl interpreter from
553 called from the thread that created the Tcl interpreter.
882 :title-reference:`Tcl and the Tk Toolkit (2nd edition)`, for details).