stdout redirection
If you are using Tcl 8.6, you can trap all the output to stdout by adding a suitable transform via chan push: # Use a class to simplify the capture code oo::class create CapturingTransform { variable var constructor {varName} { # Make an alias from the instance variable to the global variable my eval [list … Read more