Tkinter: Exception RuntimeError: 'maximum recursion depth exceeded'

Olaf Dietrich odt at dtrx.de
Wed Oct 13 14:38:10 CEST 2010


Lawrence D'Oliveiro <ldo at geek-central.gen.new_zealand>:
> In message <i93mgn$i39$1 at 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()).
[...]
> How about simply avoiding recursive updates.
> 
> Add this line to your __init__ method:
> 
>    self.reentered = False
[...]
>    if not save_reentered:
>        self.root.update()

I tried this, but it makes the GUI even less responsive
than the unconditional call of update_idletasks().

Thanks,
Olaf




More information about the Python-list mailing list