This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author peeble
Recipients
Date 2005-08-12.15:57:59
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
same as bug:
[ 1164742 ] Tkdnd.py crashes due to read-only attributes

Python 2.4.1 (#1, Mar 30 2005, 23:01:07) 
[GCC 3.3.5] on linux2
Type "help", "copyright", "credits" or "license" for
more information.
>>> import Tkinter
>>> r=Tkinter.Tk()   
>>> r.a=1
>>> del r.a
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/lib-tk/Tkinter.py", line
1660, in __delattr__
    return delattr(self.tk, attr)
TypeError: 'tkapp' object has only read-only attributes
(del .a)

The problem vanishes commenting out the __delattr__
methods in class Tk (module Tkinter.py):

class Tk(Misc, Wm):
    ...
    def __delattr__(self, attr):
        "Delegate attribute access to the interpreter
object"
        return delattr(self.tk, attr)

I don't know if there is same subtle problem.
History
Date User Action Args
2008-01-20 09:58:06adminlinkissue1257772 messages
2008-01-20 09:58:06admincreate