Curious behaviour of Tkinter object

zefciu zefirek at Speacock.Pau.Apoznan.Mpl
Sat Mar 10 22:36:16 CET 2007


I am writing a program with python and Tkinter.  I have encountered a
mysterious problem with the whole application hanging itself (cannot be
stopped with ctrl-c, must be killed from another console).  I have done
several tests with interactive mode, and here what I noticed:
- the problem is with a class MandelSetWindow that I attach, as other
classes work properly

- the class can be initialized properly, but behaves strangely with
other windows.  Here is how to reproduce this bug:

* import Tkinter.Tk and this class
* create a Tk() instance and take a reference to it
* create an instance to this class (can use (None, None) as arguments)
and take a reference to it

Now everything looks normal.  Both references refer to objects like they
were created.  But try to e.g. withdraw() either the root Tk window or
this dialog.  You will notice that the other withdraws.  I really can't
understand why it happens like this.

zefciu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mandelsetwindow.py
Type: text/x-python
Size: 2649 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20070310/7cd86317/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mandelpalette.py
Type: text/x-python
Size: 1175 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20070310/7cd86317/attachment-0001.py>


More information about the Python-list mailing list