Faqts : Computers : Programming : Languages : Python : Snippets : Tkinter

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

6 of 6 people (100%) answered Yes
Recently 5 of 5 people (100%) answered Yes

Entry

Python, Tkinter and Tcl (newbie alert)

Sep 15th, 2009 02:23
jick heir, 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 :^)=
"""
http://sundhedernaeringguide.blogspot.com/
http://zdravevyzivypruvodce.blogspot.com/
http://guidasalutenutrizione.blogspot.com/
http://gesundheiternahrungpflege.blogspot.com/
http://soinssantenutrition.blogspot.com/
http://zdravljeprehranavodic.blogspot.com/
http://healthnutritionhoito.blogspot.com/
http://hlhnutgr.blogspot.com/
http://gezondheidvoedinggids.blogspot.com/
http://taplalkozas-egeszsegugyikezikonyv.blogspot.com/
http://hlthnutbg.blogspot.com/