1 #!/usr/local/bin/wish -f
2 # Simple Tk script to create a button that prints "Hello, world".
3 # Click on the button to terminate the program.
5 # The first line below creates the button, and the second line
6 # arranges for packer to manage the button's geometry, centering
7 # it in the application's main window.
9 button .hello -text "Hello, world" -command {
10 puts stdout "Hello, world"; destroy .
12 pack append . .hello {top}