From: MartinLemburg on
Hello,

I want to use a safe slave interpreter and I want to "expose" some of
the packages loaded in the main interpreter to this safe slave
interpreter.

The first thought was to transfer the tcl_library, tcl_libPath, and
auto_path variable contents to the safe interpreter and to use
"package require ..." to re-load the desired packages into the safe
interpreter.
But this seems not to work.

So ... is there a chance to transfer whole namespaces to the safe
interpreter, instead of exposing single namespace commands via
interpreter aliases?
Or is it the right way to create one interpreter alias per namespace
command in the safe interpreter?

Best regards,

Martin
From: Johannes Kuhn on
You can use the Safe Base, witch provide a less restricted
environment. This allows to load packages. This might be the best way,
and probably exactly what you want.

To create one alias per namespace, you could use the namespace unknown
command and alias the namespace specific alias.

To transfer a complete namespace, you could use info vars, info procs,
info body, info args, info default etc to reflect the namespace in the
master.

Best regards,

Johannes