On Mon, 22 Aug 2005 12:16:01 +0100, m7b52000 <[EMAIL PROTECTED]> wrote:
>> command = lambda : Calc(a.get()) > I get the following message when I use lambda as above: > > TypeError: <lambda>() takes no arguments (1 given) Oops, forgot! The Scale widget outputs a single argument - the value of the slider. You therefore could write: command = lambda value : Calc(value) or even simpler: command = Calc In the latter case, you're supplying your "calc" function as the function to be called. Calc takes a single argument - the value of the slider, so it fulfills the task. Note that we're passing "Calc" (the function itself), not "Calc(...)" (the result of calling the function) regards Matt -- | Matt Hammond | R&D Engineer, BBC Research and Development, Tadworth, Surrey, UK. -- http://mail.python.org/mailman/listinfo/python-list