takes no arguments (1 given)
Mike
hennebry at web.cs.ndsu.nodak.edu
Mon Dec 3 14:10:46 EST 2007
In the following Display inherits from the Tkinter class Canvas:
import sys
from Tkinter import *
class Display(Canvas) :
...
def fill_canvas() :
slop=self.slop
set_sr(int(self.cget('width'))+slop,
int(self.cget('height'))+slop)
self.refresh()
...
disp=Display(fred, None)
disp.pack()
def stupid(unused) : disp.fill_canvas()
disp.bind("<Configure>", stupid)
mainloop()
>From the above I get:
Exception in Tkinter callback
...
File Ca_canvas.py, line 173, in stupid
def stupid(unused) : disp.fill_canvas()
TypeError: fill_canvas() takes no arguments (1 given)
What is going on?
I tried to do something similar with lambda
and got the same result.
More information about the Python-list
mailing list