safe(3tcl) Tcl Built-In Commands safe(3tcl) NAME Safe - SYNOPSIS ::safe::interpCreate ?slave? ?options...? ::safe::interpInit slave ?options...? ::safe::interpConfigure slave ?options...? ::safe::interpDelete slave ::safe::interpAddToAccessPath slave directory ::safe::interpFindInAccessPath slave directory ::safe::setLogCmd ?cmd arg...? OPTIONS ?-accessPath pathList? ?-statics boolean? ?-noStatics? ?-nested boolean? ?-nestedLoadOk? ?-deleteHook script? DESCRIPTION Safe Tcl Tcl Safe Base Tcl Safe Base Tcl Safe Base source, load, file, encoding, exit (token) source() source ( SECURITY ). Safe Base safe : COMMANDS : ::safe::interpCreate ?slave? ?options...? ALIASES OPTIONS OPTIONS slave ::safe::interpCreate ::safe::interpInit slave ?options...? interpCreate interp create -safe slave options slave name value name value slave OPTIONS : # Create a new interp with the same configuration as "$i0" : set i1 [eval safe::interpCreate [safe::interpConfigure $i0]] # Get the current deleteHook set dh [safe::interpConfigure $i0 -del] # Change (only) the statics loading ok attribute of an interp # and its deleteHook (leaving the rest unchanged) : safe::interpConfigure $i0 -delete {foo bar} -statics 0 ; ::safe::interpDelete slave deleteHook ::safe::interpFindInAccessPath slave directory directory : $slave eval [list set tk_library [::safe::interpFindInAccessPath $name $tk_library]] ::safe::interpAddToAccessPath slave directory directory : $slave eval [list set tk_library [::safe::interpAddToAccessPath $name $tk_library]] ::safe::setLogCmd ?cmd arg...? : ::safe::setLogCmd puts stderr source : NOTICE for slave interp10 : Created NOTICE for slave interp10 : Setting accessPath=(/foo/bar) staticsok=1 nestedok=0 deletehook=() NOTICE for slave interp10 : auto_path in interp10 has been set to {$p(:0:)} ERROR for slave interp10 : /foo/bar/init.tcl: no such file or directory OPTIONS ::safe::interpCreate::safe::interpInit ::safe::interpConfigure -accessPath directoryList source load SECURITY -statics boolean ( load {} Tk) true : -noStatics -statics false -nested boolean false : -nestedLoadOk -nested true -deleteHook script script (hook)({}) ALIASES : source fileName Tcl source() source source SECURITY load fileName load file ?subCmd args...? file file dirnamejoin extensionroottailpathname split file encoding ?subCmd args...? enconding encoding system exit Tcl SECURITY Safe Base (annoyance) CPU real estate Safe Base interp sourceloadexit (mediate) file encoding source ::safe::interpCreate ::safe::interpInit source load [file join token filename] (: Unix token/filename Windows token\filename Mac token:filename ) token accessPath filename () source source source source : (".") .tcl tclIndex auto_path tcl_library (: Tcl () Safe_Init C ) auto_path Tcl () tcl_library tcl_library () auto_path () -accessPath ( interpConfigure -accessPath list) accessPath auto_reset auto_index SEE ALSO interp(n), library(n), load(n), package(n), source(n), unknown(n) KEYWORDS alias, auto-loading, auto_mkindex, load, master interpreter, safe interpreter, slave interpreter, source [] [] 2001/11/07 Linux man : http://cmpp.linuxforum.net man man https://github.com/man-pages-zh/manpages- zh Tcl 8.0 safe(3tcl)