Tcl/Tk is a simple way to script small GUIs.
Can anyone give a nice example with a button and a text widget. When the button is pressed should a sh
Some suggestions:
To append the output to the text widget, instead of specifying line 999999, you can use the index end, which refers to the position just after the last newline. For example,
.main insert end "$x\n"
To have the text scroll as the command is outputting, use the see command. For example, after appending to the .main text widget
.main see end
You may also want to consider grabbing the command output asynchronously, by using the fileevent command.