O'Reilly logo

Practical Programming in Tcl & Tk, Third Edition by Brent B. Welch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The namespace Command

Table 14-1 summarizes the namespace operations:

Table 14-1. The namespace command.
namespace currentReturns the current namespace.
namespace children ?name? ?pat?Returns names of nested namespaces. name defaults to current namespace. pat is a string match pattern that limits what is returned.
namespace code scriptGenerates a namespace inscope command that will eval script in the current namespace.
namespace delete name ?name? ...Deletes the variables and commands from the specified namespaces.
namespace eval name cmd ?args? ...Concatenates args, if present, onto cmd and evaluates it in name namespace.
namespace export ?-clear? ?pat? ?pat? ...Adds patterns to the export list for current namespace. Returns export list if no patterns. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required