passing arguments from scale widget to function

Matt Hammond matt.hammond at rd.bbc.co.uk
Mon Aug 22 14:34:39 CEST 2005


> Ahhhh. Partial success with : command = Calc. A slider will now pass its  
> argument to a function without problem. My Calc function however is  
> expecting 3 arguments - 1 from each slider i.e moving any of the 3  
> sliders should cause a recalculation. I am now getting the following  
> error:
> TypeError: Calc() takes exactly 3 arguments (1 given)

I'm sure you can figure this out now! Either:
   use lambda functions, as described, to call Calc with the correct  
arguments
or:
   write three functions (one for each slider) that call Calc with all 3
   arguments it requires

regards



Matt
-- 

| Matt Hammond
| R&D Engineer, BBC Research and Development, Tadworth, Surrey, UK.



More information about the Python-list mailing list