Unix Review > Archives > 2002 > February 2002

February 2002

Regular Expressions: What You Should Know about Tk

by Cameron Laird and Kathryn Soraiz

Last month, a correspondent speculated that "there are probably more users of Tk outside of Tcl (perl, python, ruby) than in Tk/Tcl." That's a good subject for "Regular Expressions" to explain.

Toolkit and Language and Library and...

Let's be clear what we're talking about. Tk (http://mini.net/tcl/Tk)is the graphical toolkit maintained along with the core distribution of the Tcl language. Although John Ousterhout, creator of Tcl, sketched a crude version of Tk in 1988, the first one usable outside his laboratory appeared in 1990. Since then, Tk has emphasized portability (binaries are available not only for Unix, but also MacOS, Windows, and even OpenVMS), ease of learning ("Hello, World" is a one-liner), simplicity (Tk is used in many mission-critical and long-running "control panels" that can't tolerate memory leaks or other software surprises), and compatibility with other software (Tk is often the "glue" that reshapes existing programs).

What's confusing for newcomers to Tk is that this body of portable, easy, simple, and compatible open-source graphics code appears wrapped up in several different packages. Sometimes when programmers talk about Tk, they have in mind the Tk language. As a language, Tk includes all of the Tcl base, plus five dozen additional commands such as button and font.

When someone talks about "running Tk," or "installing Tk," he or she typically has in mind the Tk language processor. This is wish (or wish.exe under Windows), the "windowing shell" executable. wish is what you need at run-time either to interpret Tk scripts, or just interactive sessions you might choose to launch.

Sys Admin Spotlight

CMP DevNet Spotlight

C++/CLI: Cloning
Making copies of heap-based objects

In the News

CD-ROM

Sys Admin and The Perl Journal CD-ROM version 11.0

Version 11.0 delivers every issue of Sys Admin from 1992 through 2005 and every issue of The Perl Journal from 1996-2002 in one convenient CD-ROM!

Order now!




MarketPlace

Villanova University Six Sigma & IT Certificate Programs
100% Online programs in Six Sigma, IS Security, CISSP Prep, Business Analysis, Proj. Mgmt. and more!

Introducing SAP Business ByDesign-EXCLUSIVE PREVIEW
Check Out SAP's Most Complete On-Demand Business Software For Midsize Co. Sign Up For Free Preview.

Flowcharts from C/C++ code -- Free trial download
Understand C/C++ code in less time. A new team member ? Inherited legacy code ? Get up to speed faster with Crystal Flow for C/C++. Code-formatting improves readability. Flowcharts are integrated with code browser. Export flowcharts to Visio.

FREE virus, spyware & adware scan
Find the malware your AV missed with the Sophos Threat Detection Test.

Wanna see your ad here?