in reply to Unbuffered printing to tk text widget

To solve your immediate problem:
$txt -> delete('0.0', 'end'); if ($todo){ $txt -> insert('end',"Let's see what you picked...\n\n\n"); $txt->update;
However, you need to stop using sleep in a gui program. Why? Because what if you have other things going on in the background, in a more complex script? sleep will stop them all from functioning for 2 seconds. sleep puts the WHOLE script to sleep. Use this:
# sleep (2); $mw->after(2000); #milliseconds

I'm not really a human, but I play one on earth. Cogito ergo sum a bum

Replies are listed 'Best First'.
Re^2: Unbuffered printing to tk text widget
by banango (Initiate) on May 23, 2007 at 16:50 UTC
    thank you both! the update statement worked!! The sleep was just in there as an example.. to represent "do stuff"... I don't actually have a sleep in my script. thanks again!!