Advanced Search
Mail us
Home    Manuel    Links    Faq    Submit a tcl/tk Reference    Contact Us

    Some examples tcl/tk codes     Man of Bwidget     Man of blt     mkwidget screenshots     TkOgl     Video Demo real.

  How do I get my wish application to execute on Unix (I just get a wish prompt!)?
 For Unix, most systems require a full pathname to the interpreter.   So
you cannot start a wish script out as

#!wish -f

Likewise, many Unix systems have a maximum length of characters that you
can put on a #! line.  If you exceed this, you do not get the behavior
you expect.  So do not try to put something like:

#!/projects/somethingverylong/bin/wish -f

followed by your wish code.  Keep the lines short - under 32 characters
is recommended.  Another option is the following:

# This line makes the next one a comment in Tcl 
exec /path/to/wish "$0" ${1+"$@"}

the `/path/to/` is unnecessary if you know that wish is in the user`s
path.  Be careful to make sure that you are referencing the correct
version of wish.  Tk4+ installs its libraries and executable with the
version number attached by default.