tcl_libpath

This is a variable found in Unix interactive tclsh. Detail on this page the purpose for which it is used.


DGP 2003-05-14: tcl_libPath has only one documented use. It holds a list of directories, and the C-level encoding documentation says that if you add another directory to that list, then the new directory will be searched for *.enc files that hold additional encodings for Tcl to recognize.

But... that documentation is false. This means of extending the encoding search path does not work. Never has. See Tcl Bug 463190. Starting with Tcl 8.5, the encoding dirs command is the facility that actually works.

So,... Tcl programmers should just pretend tcl_libPath does not exist. It cannot be used for anything useful. Treat it as an internal detail of Tcl, not for your use.


LV and in fact, in at least Tcl 8.5a4, the variable doesn't appear to be found:

 % puts $tcl_libPath
 can't read "tcl_libPath": no such variable

JMN 2023-07 This variable still seems to be around in tclkit executables from various sources with tcl patch levels of 8.6 & 8.7


See also tclvars and Tcl syntax.