REPL stands for Read Eval Print Loop, looks like a linux shell environment.
With the help of Tclx, REPL can be implemented in one command commandloop:
# REPL = Read Eval Print Loop
package require Tclx
# commandloop ?-async? ?-interactive on | off | tty? \
# ?-prompt1 cmd? ?-prompt2 cmd? \
# ?-endcommand cmd?
proc endcommand {args} {
puts ""
puts ""
puts "See U ..."
}
proc tcl_prompt1 {args} {
puts -nonewline "tclx % "
}
set tcl_prompt1 tcl_prompt1
commandloop -endcommand endcommand
puts "It's Amazing ..."