From: Glenn Jackman on
At 2010-02-24 10:07AM, "suchenwi" wrote:
> A simple way is to add, at the end of script.tcl, a read-eval-print
> loop:
>
> while 1 {
> puts -nonewline "% "; flush stdout
> gets stdin line
> catch $line res
> puts $res
> }

An optimization is to collect lines into a variable, say "cmd", until
[info complete $cmd] becomes true, then catch $cmd.

--
Glenn Jackman
Write a wise saying and your name will live forever. -- Anonymous