Practical Programming in Tcl & Tk, Third Edition By Brent B. Welch
Table of Contents
Chapter 19. Multiple Interpreters and Safe-Tcl
The interp Command
The interp command is used to create and manipulate interpreters. The interpreter being created is called a slave, and the interpreter that creates it is called the master. The master has complete control over the slave. The interp command is summarized in Table 19-1.
Table 19-1. The interp command.
interp aliases slave
Lists aliases that are defined in slave.
interp alias slave cmd1
Returns the target command and arguments for the alias cmd1 in slave.
interp aliasslave cmd1 master cmd2 arg ...
Defines cmd1 in slave that is an alias to cmd2 in master with additional args.
interp create ?-safe? slave
Creates an interpreter named slave.
interp delete slave
Destroys interpreter slave.
interp eval slave cmd args...
Evaluates cmd and args in slave.
interp exists slave
Returns 1 if slave is an interpreter, else 0.
interp expose slave cmd
Exposes hidden command cmd in slave.
interp hide slave cmd
Hides cmd from slave.
interp hidden slave
Returns the commands hidden from slave.
interp invokehidden slave cmdarg...
Invokes hidden command cmd and args in slave.
interp issafe slave
Returns 1 if slave was created with -safe flag.
interp marktrusted slave
Clears the issafe property of slave.
interp share master file slave
Shares the I/O descriptor named file in master with slave.
interp slaves master
Returns the list of slave interpreters of master.
interp target slave cmd
Returns the name of the interpreter that is the target of alias cmd in slave.
interp transfer master file slave
Transfers the I/O descriptor named file from master to slave.