Bugs item #1257772, was opened at 2005-08-12 17:57
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1257772&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Tkinter
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: peeb (peeble)
Assigned to: Martin v. Löwis (loewis)
Summary: tkapp read-only attributes

Initial Comment:
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.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1257772&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to