[ Team LiB ] Previous Section Next Section

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 target command and arguments for the alias cmd1 in slave.

interp alias slave 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 cmd arg ...

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 recursionlimit slave ?limit?

Set or get the interpreter recursion limit for slave. (Tcl 8.4)

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.

    [ Team LiB ] Previous Section Next Section