Re: Writing a read only attribute

2007-07-06 Thread Martin v. Löwis
> root = Tk() > > # save call address > original_tk_call = root.tk.call > > # disable tcl command execution (this is the read-only attribute) > root.tk.call = tk_dummy_call > > ... some code ... > > # restore tcl command execution > root.tk.call = original_tk_call > > > My goal is to make ins

Writing a read only attribute

2007-07-06 Thread Fabrizio Pollastri
My code is the following: from Tkinter import * def tk_dummy_call(*args): return root = Tk() # save call address original_tk_call = root.tk.call # disable tcl command execution (this is the read-only attribute) root.tk.call = tk_dummy_call ... some code ... # restore tcl command execution

Re: Writing a read only attribute

2007-07-06 Thread Michele Simionato
On Jul 6, 8:27 am, Fabrizio Pollastri <[EMAIL PROTECTED]> wrote: > Hello, > it is possible to force in some way a write to a read-only attribute of > a python object? In which case? > Thanks for any answer. > > F. Pollastri What do you mean by read-only attribute? If you are trying to change attr

Writing a read only attribute

2007-07-05 Thread Fabrizio Pollastri
Hello, it is possible to force in some way a write to a read-only attribute of a python object? In which case? Thanks for any answer. F. Pollastri -- http://mail.python.org/mailman/listinfo/python-list