Boston Linux & UNIX was originally founded in 1994 as part of The Boston Computer Society. We meet on the third Wednesday of each month at the Massachusetts Institute of Technology, in Building E51.

Member Contributed Articles

1995a: Using Tcl and Tk

(by Guy Bzibziak; February 15, 1995)

[Back to Index]

BCS Linux/Unix Meeting - Feb 15, 1995

BCS Linux & Unix User Group
Meeting Notes - Wednesday, February 15, 1995
minutes by Guy Bzibziak (
Meeting Topic: Using Tcl & Tk

Member Robert Luoma presented this month's topic of using Tcl & Tk (Tcl = "Toolkit control language"; Tk = X extensions to Tcl). His talk described his experiences in learning and using these two scripting tools in performing various tasks on his computer.

As Robert explained, this basically was his first considered use of these tools, having picked up John K. Ousterhout's "Tcl and the Tk Toolkit" just about ten days earlier. Ousterhout first implemented Tcl back in the late 1980's, out of the need for a reusable, extensible tooklit language that had the ability to use C language libraries, and yet be accessible through scripts or a command-line mode.

His experiences, as described to our audience, showed that while Ousterhout's book gives a thorough coverage of the Tcl & Tk, it is not the easiest reading instructional source for beginners, causing Robert to cast about the 'Net for further examples, as Ousterhout's book was the only printed source at this time. Some additional sources were a review draft of a forthcoming book, "Practical Programming in Tk/Tcl":, which in Robert's opinion gave more concrete examples to learn from.

Tcl's interpreter is a library of C routines, that can be embedded in C programs, or can be used to write X applications; Tk being the X extension of Tcl. Tcl is an interpreted script language, with syntax similar Bourne shell scripting, or to Perl's. Variables, procedures, loops, file I/O and more can be performed using Tcl.

Robert showed how quickly a simple program for X could be written by creating a small box that displayed "Hello, World!" and would react to certain mouse clicks, within about two minutes from start to finish. He also showed what could be done with "wish" (window shell), in performing basic tasks like retrieving file names for further action, or drawing various shapes and curves on a canvas.

From these simple beginnings, Robert showed that Tcl and its extensions (Tk, embedded Tcl and Expect) are indeed valuable tools, not just for those with a programming bent, but for anyone who wishes to "roll their own" utilities.

Several minutes of questions and answers followed the main presentation, on the night's main topic and other items.

Some additional sources of information:

Tcl and the Tk Toolkit. Ousterhout, John K. (Addison-Wesley Publishing, ISBN 0-201-63337-X)
Linux Journal:
Dec. 1994: Welsh, Mat. X Window System Programming with Tcl and Tk
Feb. 1995: Welsh, Mat. Using Tck and Tk from Your C Programs
"Practical Programming in Tk/Tcl":

Software sources:

Tcl/Tk /pub/linux/...
Embedded Tk
Expect /pub/Linux/... /pub/linux/...

BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!

Boston Linux & Unix /