Tcl and Python Environments

When a Tcl script is started, the standard set of Tcl and, if running with the Tk widgets support, Tk variables is available in the interpreter.

In addition, the toolkit provides access to internal toolkit status information via the global array variable ::cactvs in Tcl , or a dictionary with the same name in Python . It is automatically visible both in the top-level interpreter and in slave and thread interpreters. Additionally, the control variables in the language interpreters are linked, i.e. a change made by Tcl is visible in the Python , and vice versa.

Many of the elements in the array may be modified by script commands. If they are manipulated this way, their effects are immediate, but not persistent, and usually visible in all interpreters and, if the value is linked to a core library value, throughout the library for compiled code. The exception are specific elements which are thread-local. Changes to these only modify the seen data to all interpreters in that thread, and library code executing in that thread context.

Parameter changes are forgotten the next time the interpreter is executed.

This is a thread-local flag. Changing it has an effect for future threads only if the change is performed in the base thread. Otherwise, new threads inherit the current setting of the base thread.