Tcl style traces

Cameron Laird claird at
Wed Jan 28 18:25:32 CET 2004

In article <101fkp3nd3ea84c at>,
John Roth <newsgroups at> wrote:
>"Derek Fountain" <nomail at> wrote in message
>news:40177f07$0$1730$5a62ac22 at
>> > What do you need this for?  If you can be more specific, we might be
>> > to help you a little better.
>> I have a Tcl/Tk script which uses a canvas to graphically represent the
>> stored in the program. Whenever the data store is updated, a Tcl trace
>> automatically triggers to ensure the graphical display is kept consistent
>> with the data. I was after a simple way to convert the script to Python
>> Tkinter. Without the eqivalent of Tcl traces I'm probably going to have to
>> think about it... ;o)
>There's a facility where you can associate a widget with a
>variable so that when the variable changes the widget's
>value changes, and vice versa. I don't offhand remember the
>details though. You'll need to look at one of the references.
>The variable has to be a subclass of a special Tkinter class
>for this to work, though.
textvariable--but that applies only for a few widgets,
and only for equivalence of the widget content and the
indicated variable; there's no formatting or other pro-
cedural computation.

Cameron Laird <claird at>

More information about the Python-list mailing list