Writing a read only attribute

Fabrizio Pollastri pollastri at iriti.cnr.it
Fri Jul 6 10:36:19 CEST 2007

My code is the following:

from Tkinter import *

def tk_dummy_call(*args):

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 instances of Tkinter widgets without the effects of 
commands directed to the tcl interpreter but preserving all effects at 
python level.

More information about the Python-list mailing list