14. Creating and Using Tcl Script Libraries

Like any other modern programming language, Tcl allows you to group commonly used procedure definitions into libraries that can be used by many applications. A Tcl library can be as simple as a single script file defining a few utility procedures. Or you can combine multiple library script files into a single package that you can distribute. Packages also have version numbers associated with them, so applications can distinguish among different historic versions of a package and require specific ones.

Additionally, Tcl allows you to bundle entire Tcl applications or libraries into single-file packs called Starkits. Combined with the Tclkit single-file Tcl interpreter, this gives you a handy means of ...

Get Tcl and the Tk Toolkit, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.