Name

package

package[options]

Manage the loading and version control of Tcl packages.

package forget package

Remove package package from the current interpreter.

package ifneeded package version [script]

Indicate that version version of package package will be loaded when script is executed. If script is omitted, return the current script.

package names

Return a list of the names of packages that have been indicated using a package provide or package ifneeded command.

package provide package [version]

Indicate that version version of package package is present in interpreter. With no version argument, return the version of the package.

package require [-exact] package [version]

Load a package into the interpreter. Version indicates the version that is desired; any package with the same major number will be loaded. -exact indicates that exactly the specified version should be loaded.

package unknown [command]

Supply a command to be executed if the interpreter is unable to load a package. With no command argument, return the current package unknown command.

package vcompare version1 version2

Compare two package version numbers. Return −1 if version1 is earlier than version2, 0 if equal, or 1 if newer.

package versions package

Return a list of the versions of package that have been registered by package ifneeded commands.

package vsatisfies version1 version2

Return 1 if scripts written for version version2 work with version1.

Get Tcl/Tk in a Nutshell 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.