Tcltk


Forum: Apps
Topic: Tcltk
started by: zakiakhmad

Posted by zakiakhmad on Sep. 22 2007,04:28
Hello

I've downloaded and installed the tcltk DSL package from its repository. Then I try to execute the tcltk script which I already made from other distro (Ubuntu). But, I failed to execute my tcltk script on DSL.

I donno how the right way to execute the tcl/tk script on DSL. Any hint?

Posted by jpeters on Sep. 22 2007,05:08
Load tcltk extension (tcltk-8.4.uci) , and then place as the first line in the code:

#!/opt/tcltk-8.4/bin/wish

Posted by mikshaw on Sep. 22 2007,12:17
Just like with shell scripts, there are multiple ways to do it.

1. Do as jpeters suggested (also make the script executable: chmod +x my_script.tcl).
2. Open tclsh or tkcon and run the script from that shell.
3. Open a shell and type "/opt/tcltk-8.4/bin/wish my_script.tcl"
4. Add /opt/tcltk-8.4/bin to PATH, open a shell, and type "wish my_script.tcl"
5. Create a desktop icon or menu item with the command in #3

I believe that adding the /opt/tcltk-8.4/bin directory to PATH saves a lot of future effort, if you plan to run other scripts.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.