interp

interp cmd ?arg ...?

Makes and runs child interpreters. A child has its own commands and variables, and never more capabilities than its parent. An alias is a command of a child that runs a command of the parent, and is the way to give a child one exact power.

Subcommands

Synopsis What it does
interp create ?-safe? ?-meter NAME? ?--? ?PATH? A new child, and its path. -meter (capability meter) counts the child in a meter of ztcl::meter.
interp eval PATH ARG ?ARG ...? Runs a script in the child.
interp alias SRCPATH SRCCMD TARGETPATH TARGETCMD ?ARG ...? Makes SRCCMD of the child run TARGETCMD of the parent.
interp aliases ?PATH? The aliases of a child.
interp delete ?PATH ...? Removes children.
interp exists PATH 1 when the child exists.
interp children ?PATH? The children.
interp cancel ?-unwind? ?--? ?PATH? ?RESULT? Stops the script of the interp with the error "eval canceled", or RESULT. With -unwind, catch does not stop the error.
interp slaves ?PATH? The old name of children.
interp issafe ?PATH? 1 for a safe interpreter.
interp hide PATH CMD ?NAME? Hides a command from the scripts of the child.
interp expose PATH NAME ?CMD? Makes a hidden command visible again.
interp hidden ?PATH? The hidden commands.
interp invokehidden PATH ?-global? NAME ?ARG ...? Runs a hidden command.
interp marktrusted PATH Makes a safe child trusted.
interp recursionlimit PATH ?N? The nesting limit of the child.
interp target PATH ALIAS The target of an alias.

Examples

Facts

Differences from Tcl 8.6