Tkinter isn't pure python. Underlying it is a live Tcl interpreter with an extension called "tk" loaded into the interpreter. Most Tkinter commands, methods and objects eventually wind up as invocations of tcl commands. For example, when you do something like:
root = tk.Tk()
f = tk.Frame(root)
b = tk.Button(f, text="Press me!")
... it gets translated into something (roughly) like this:
package require tk
frame .f
button .f.b -text "Press me!"
(note: Tkinter actually generates more complex names than .f
and .f.b
, but the concept is the same)
The call
method is the interface to this underlying tcl interpreter. It allows you to construct a tcl command and ask the interpreter to run it. It is a bridge between python and tcl.
It is not typically used in application-level code, though it can be useful in the rare cases where the Tkinter wrapper around tcl/tk doesn't provide access to some feature supported by tcl/tk.