event loop
various memory
GUI service
Under DOS,
tclsh myscript.tcl > output.txt
does what one wants, but it's harder to achieve with wish.