Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在调试一些使用子解释器的 Tcl 代码,并且不熟悉代码,因此可以方便地撒一些“放置”来显示当前解释器的路径,以了解代码正在做什么。Tcl 8.4 中有没有办法确定正在运行哪个解释器?
不,没有办法只收集信息(这将违反隔离原则)。但是您可以在创建子解释器之后将这些信息传递给它们:
set i [interp create] $i eval [list set ::myInterpName $i]