Tkinter is Python's de-facto standard GUI (Graphical User Interface) package. It is a thin object-oriented layer on top of Tcl/Tk.
Tkinter Designer : An awesome designer for Tkinter GUIs
Tk 8.5 is better than wxWidgets on Windows : ,Biospud ,2009-08-22
Tkinter is part of the standard Python distribution.
Implemented through Tcl scripting interface as much as possible, and the C API in bits. Note that, in the mid-'90s, David Ascher wrote Trinket , a C Python binding based on Brian Warkentine's earlier Rivet work. [L2 ] might provide details, or at least fossils.
Interesting things to note about Tkinter: the windows all have numeric names (eg: .123456789) and the Python callbacks are created as Tcl commands with numeric names. This means that Tkinspect (unsurprisingly) cannot inspect the Python code used for the callback. You can however manipulate the window properties and the Tcl environment.
PT 2003-07-02: Tkinspect can be used to examine and manipulate Tkinter applications. Under windows the Python app needs a little help (as send isn't available for Windows). You can send enable a Tkinter application by including the following:
root.tk.eval('package require dde; dde servername Tkinter')
which sets up the application as a Tcl DDE server. Tkinspect can connect to this now.
In fact, here is a sample application for good measure (modified from some other example):
from Tkinter import * class App: def __init__(self, master): frame = Frame(master) frame.pack() self.button = Button(frame, text="Exit", command=frame.quit) self.button.pack(side=LEFT) self.hi = Button(frame, text="Speak", command=self.say_hi) self.hi.pack(side=LEFT) def say_hi(self): print "Hello, World!" root = Tk() root.tk.eval('package require dde; dde servername Tkinter') app = App(root) root.mainloop()