In message <i93mgn$i3...@news.lrz-muenchen.de>, Olaf Dietrich wrote:

> If I replace update() by update_idletasks(), the problem
> disappears, but unfortunately, considerably fewer events
> are recorded on the canvas (when connecting the pixels with
> lines, the lines become much longer with update_idletasks()
> than with update()). If I remove both update() and
> update_idletasks(), things work similarly as with
> update_idletasks() (the display is only marginally slower
> than with update_idletasks()).
How about simply avoiding recursive updates.

Add this line to your __init__ method:

    self.reentered = False

In your viewdata method, put this at the start:

    save_reentered = self.reentered
    self.reentered = True

and this at the end:

    self.reentered = save_reentered

while the update call becomes conditional on not being reentered:

    if not save_reentered:
        self.root.update()

Of course, this is all a total guess, I really know nothing about TKinter. 
:)
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to