1. Tcl, TK and Tkinter
Tkinter is the default GUI library for Python, which is based on the TK toolset, which was originally designed for the tool Command Language (TCL). Tk has been widely ported, including Perl (PERL/TK), Ruby (RUBY/TK), Python (Tkinter). TK develops the portability and flexibility of the GUI, the simplicity of the Python scripting language and the robustness of the system language. Python, based on TK, provides a more efficient and rapid prototyping system for creating applications. Python also has system access, network operations, XML, digital visualization, database access, and all other standard libraries and third-party modules.
2, Tkinter and Python programming
Tkinter Top-Level window objects, components (labels, buttons, list boxes, and so on)
The top=tkinter.tk () #创建顶层窗口对象, called the root window.
1
Multiple top-level windows can be created in the GUI, but they can have only one root window.
The parent component (container), subassembly component has events, callbacks, event-driven
TK has two coordinate managers: one is a package (packer), one is a grid (grids)
GUI programs are similar to client/server architectures, and there is a "server-style" infinite loop. This includes waiting for GUI events, handling events, and then returning to wait mode to handle the next event.
Tkinter.mainloop () All components are ready for the backward master loop. Once in the main loop, the GUI begins to master control, and other actions come from the callback function. Top-level window tkinter.tk () Tk component button, Canvas, Checkbutton, Entry, Frame, Label, Listbox, Menu, Menubutton, message, Radiobutton, Scale, Scrollbar, Text, TopLevel.
Partial function application (PFA)
The partial function allows you to "store" some of the function variables and effectively "freeze" these predetermined parameters, and then "thaw" them out with these final parameters to call the function at runtime, after you have obtained the other variables you need. PFA is not limited to functions, but is valid for anything "callable."
3, the introduction of other GUI
(1) Tk Interface eXtensions (tix)
TIX is an extension library for TCL/TK.
(2) Tkinter extension of Python Mega widgets (PMW)
PMW extended the Tkinter.
(3) WxWidgets and WxPython
(4) GTK + and PyGTK