The interp Command

   

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 slaveLists aliases that are defined in slave.
interp alias slave cmd1Returns the 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? slaveCreates an interpreter named slave.
interp delete slaveDestroys interpreter slave.
interp eval slave cmd args ...Evaluates cmd and args in slave.
interp exists slaveReturns 1 if slave is an interpreter, else 0.
interp expose slave cmdExposes hidden command cmd in slave.
interp hide slave cmdHides cmd from slave.
interp hidden slaveReturns the commands hidden from slave.
interp invokehidden slave cmd arg ... Invokes hidden command cmd and args in slave.
interp issafe slaveReturns 1 if slave was created with -safe flag.
interp marktrusted slaveClears the issafe property of slave.
interp share master file slaveShares the I/O descriptor named file in master with slave.
interp slaves masterReturns the list of slave interpreters of master.
interp target slave cmdReturns the name of the interpreter that is the target of alias cmd in slave.
interp transfer master file slaveTransfers the I/O descriptor named file from master to slave.


       
    Top
     



    Practical Programming in Tcl and Tk
    Practical Programming in Tcl and Tk (4th Edition)
    ISBN: 0130385603
    EAN: 2147483647
    Year: 1999
    Pages: 478

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net