Support for Tkinter is spread across several modules. Tk and/or Ttk packages, which will in turn make calls to Xlib, Cocoa, or GDI. The Tcl interpreter will then call into the Tcl command string to an internal _tkinter binary module, which thenĬalls the Tcl interpreter to evaluate it. The tkinter module first assembles a Tcl/Tk command string. When your Python application uses a class in Tkinter, e.g., to create a widget, I.e., Xlib on Unix/X11, Cocoa on macOS, GDI on Windows. Internally, Tk and Ttk use facilities of the underlying operating system, Pythonīindings are provided in a separate module, tkinter.ttk. Ttk is distributed as part of Tk, starting with Tk version 8.5. Themed Tk (Ttk) is a newer family of Tk widgets that provide a much betterĪppearance on different platforms than many of the classic Tk widgets. Tk uses Tcl’s event queue to generate and process GUI events. Tk’s widgets are very customizable, though at the cost of a dated appearance. Tk object embeds its own Tcl interpreter instance with Tk loaded into That adds custom commands to create and manipulate GUI widgets. Multitasking, and Tkinter bridges this difference Unlike Python, Tcl’s execution model is designed around cooperative Each interpreter has an event queue,Īnd there are facilities to send events to it and process them. The Tcl library has a C interface toĬreate and manage one or more instances of a Tcl interpreter, run TclĬommands and scripts in those instances, and add custom commands Most commonly embedded into C applications as a scripting engine or an It can be used on its own as a general-purpose programming language, it is Tcl is a dynamic interpreted programming language, just like Python. Python’s binary releases also ship an add-on module Modules, each with separate functionality and its own officialĭocumentation. Tcl/Tk is not a single library but rather consists of a few distinct (ISBN 978-0596158101)īy John Ousterhout, inventor of Tcl/Tk, and Ken Jones does not cover Tkinter.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |