Entry
Python, Tkinter and Tcl (newbie alert)
Jul 5th, 2000 09:59
Nathan Wallace, unknown unknown, Hans Nowak, Snippet 77, Greg McFarlane
"""
Packages: gui.tkinter
"""
"""
It is easy to give complete tcl scripts to the Tkinter tcl interpreter.
For example:
======================================================================
"""
import Tkinter
root = Tkinter.Tk()
tclScript = """
# Here is a tcl script. Three cheers for tcl!
label .label -text "Honk if you think tcl is the best"
pack .label
button .button -text "Go away please" -command {destroy .}
pack .button
"""
root.tk.call('eval', tclScript)
root.mainloop()
"""
======================================================================
In this sense, python is a complete superset of tcl :^)=
"""