Version 15 of TclX

Updated 2002-03-17 13:41:42

Purpose: to describe the Extended Tcl extension's capabilities.


IMPORTANT: the TclX home page supplied below is out-of-date, in several regards. Most crucially, conventional access to the NeoSoft archive is broken, and it's apparently necessary to go here [L1 ] for downloads. Mirrors exist at several places, including Red Hat [L2 ], SourceForge [L3 ] (or is this supposed to be the real home?), Slackware, Marty Backe's pages [L4 ], Andreas Kupries' personal snapshot repository [L5 ], ... Morever, ActiveTcl includes TclX.

TclX [L6 ] is an essential package of extensions for Tcl/Tk. This package creates interpreters known as tcl and wishx. It adds advanced code loading facility, new programming constructs, debugging and profiling facilities, unix access commands, file I/O facilities including awk-like scanning for strings, extended list and a new key list capability, extended character and string manipulation commands, and time and date manipulation commands.

Extended Tcl is oriented towards system programming tasks and large application development. It provides a variety of additional interfaces to the underlying operating system, as well as many new programming constructs, text manipulation tools, and debugging capabilities.

Over the years, a variety of features originally appeared in TclX, and then, as the ideas were proven, migrated to the Tcl core. These features include Tcl's I/O system, its associative arrays, Internet networking interfaces, upvar, memory debugging... even incr.

TclX includes documentation on debugging memory problems [L7 ], on how to use its keyed list data type [L8 ], manipulating binary structures via handles [L9 ], a guide to writing Tcl commands in C [L10 ], and a reference manual for the new TclX commands themselves [L11 ].


On SourceForge it can be found at http://sourceforge.net/projects/tclx


In the past, there was also a TkX component. This part is being removed, as is the code for creating stand-alone interpreters tcl and wishx.


(Give an alternate description of TclX as Tcl augmented with POSIX stuff, such as fork, plus other conveniences common among Unixoids, including keyed lists, profiling, ...)


Extended Tcl has:

     The following variables are set and/or used by the Tcl shell.

     argv0
          Contains the name of the Tcl program specified on the com-
          mand line or the name that the Tcl shell was invoked under
          if no program was specified.  argc Contains a count of the
          number of argv arguments (0 if none).  argv A list contain-
          ing the arguments passed in from the command line, excluding
          arguments used by the Tcl shell.  The first element is the
          first passed argument, not the program name.

     tcl_interactive
          Set to 1 if Tcl shell is invoked interactively, or 0 if the
          Tcl shell is directly executing a script.  Normally checked
          by scripts so that they can function as a standalone appli-
          cation if specified on the command line, but merely load in
          and not execute if loaded during an interactive invocation
          of Tcl.

     auto_path
          Path to search to locate Tcl autoload libraries.  Used by
          the both the Tcl and TclX library autoloading facility.

     tclx_library
          Path to the TclX runtime library.  If your running the TclX
          shell or an application based on it (like wishx).  The TclX
          initialization file normally adds this to the auto_path.

     tkx_library
          Path to the TkX runtime library.  This is set only if your
          application has called Tkx_Init.  The TkX initialization
          file normally adds this to the auto_path.

     tcl_prompt1
          Contains code to run to output the prompt used when interac-
          tively prompting for commands.

     tcl_prompt2
          Contains code to run to output the prompt used when interac-
          tively prompting for continuation of an incomplete command.

     TCLXENV
          Array that contains information used internally by various
          Tcl procedures that are part of the TclX shell. 

Karl Lehenbauer first wrote TclX, and he and Mark Diekhans maintained it for a long time.


Category Package