Tk is a platform-independent GUI
framework developed for Tcl. From a Tcl shell (tclsh), Tk may be invoked using the command package require Tk. The program
wish (WIndowing SHell) provides a way to run a tclsh shell in a graphical window as well as providing Tk. Tk has the following characteristics: •
Platform-independent: Like Tcl, Tk is interpreted. It has been ported to multiple platforms and can easily run on all of them without modification. •
Customizable: Almost all the features of a widget in Tk are customizable through options during the creation of the widget or later on through the configure command. •
Configurable: Many of the options can be stored in an option database, making it very easy to parameterize the look of an application (such as the color scheme). This also means that storing the application-specific options is only a matter of saving the option add commands and executing them on loading the application.
Language bindings A library written in one programming language may be used in another language if
bindings are written; Tk is integrated with the Tcl language. Various other languages have bindings for Tk, a partial list of which is on the Tk website. Bindings exist for additional languages which might not be listed, including
Ada (called TASH),
Go (through ),
Haskell (called HTk),
Perl,
Python (called
Tkinter),
R (through the standard package: tcltk),
Ruby,
Rexx, and
Common Lisp. There are several ways to use Tk from
Perl: the Tcl::Tk and Tkx Perl modules, both of which use Tcl as a bridge to access Tk, and Perl/Tk, which provides native Perl access to Tk structures. The
Python binding uses Tcl as a bridge to Tk. ==Features==