Packages in Tcl

Tcl offers a mechanism to look for and create packages—reusable pieces of code, either bundled with Tcl, created as additional projects or code you write and want to use in multiple applications. Packages are meant to provide an easy to use mechanism for using additional libraries—either your library or third-party libraries. Packages are identified using a package name and version.

Package name can be any string, but a good practice is to name the package using lowercase only and using the same name as the namespace used. For example, functionality to work with base64 encoded data is called base64 and all commands are in the base64 namespace.

Versions are one or more numbers separated by dots, where the first leftmost one indicates ...

Get Tcl 8.5 Network Programming 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.