Tcl was designed from the beginning to be easy to embed in compiled programs. But sometimes -- particularly in event-driven GUI programs -- it is desirable to capture the output Tcl normally sends to the ''stdout'' and ''stderr'' I/O channels. The channel IO system in TCL is described in exhaustive detail in the TCL manual http://www.tcl.tk/man/tcl8.5/TclLib/CrtChannel.htm but