IT lexicon › Programming › Tk

Tk

Programming På svenska → Updated: 2026-10-08
More info
Creator
John Ousterhout
Released
Type
GUI toolkit
License
BSD-style
Website

The toolkit that let anyone put up an X window with buttons in ten lines of script, at a time when the alternative was a thousand lines of C against Motif.

John Ousterhout wrote Tk at Berkeley as a graphical companion to his scripting language Tcl, and the first release came in 1991. The idea was that widgets would be created and driven by commands rather than C code: button .b -text Hello -command exit followed by pack .b, and the button was on screen. The wish shell ran such scripts directly, and an afternoon was enough to learn what took weeks with Motif or Xt. The look was a deliberate Motif imitation, thick bevels and all, so the programs didn't stand out on a Unix desktop.

From version 4.1 in 1996 the same scripts also ran on Windows and Macintosh, which made Tk the first practical cross-platform GUI library. Python bound it as tkinter as early as 1994, Perl and Ruby followed, and it still ships with every Python installation. The themed Ttk widgets of 2007 took the edge off the nineties look, but anyone who finds a program with every button in precisely the same shade of grey knows what it was built with.

← Back to the lexicon