On Mon, 10 May 1999, Iftach Hyams wrote:
>Is there a way for introducing the STDOUT of a command in a
>text/label control inside a WISH ?
>It can be done in another terminal by using something like :
>
>touch /tmp/myfile
>xterm -e tail -f /tmp/myfile &
>mycommand | tee -a /tmp/myfile
If you mean, introduce the stdin into the managed text variable of a Tcl
widget, the answer is, yes, but not like that.
afaik you need to set up some sort of polling mechanism using a timer in
Tcl to set the managed variable to its updated version. One way to do
that, is using threads. If you do not refresh the Tcl display system after
that (or from time to time) then the changes won't show. imho the best way
to do this is to implement a line buffer in Tcl and assign and update the
managed variable upon '\n'.
0.02 Ag.
Peter