First page Back Continue Last page Overview Image
8.5 Control Structures – interp
[207] interp invokehidden -namespace N
> cat inside.tcl
set x "this is a test from inside [namespace current]."
> cat invoke.tcl
set i [interp create -safe]
set file [file join [file dirname [info script]] inside.tcl]
interp invokehidden $i -namespace ::test::foo::bar source $file
set result [interp eval $i [list set ::test::foo::bar::x]]
puts stdout $result
> tclsh invoke
this is a test from inside ::test::foo::bar.