Posted to tcl by mjanssen at Sun Aug 26 20:04:57 GMT 2007view raw
- proc doexec {} {after 2000}
- fconfigure stdin -buffering line
- proc dostep {} {
- doexec
- after idle {after 0 dostep}
- }
- proc get {} {
- gets stdin data
- puts $data
- puts -nonewline "% "
- flush stdout
- }
- puts -nonewline "% "
- flush stdout
- fileevent stdin readable get
- dostep
- vwait forever