Tkinter function variable passing

arvind arvind.mulay at gmail.com
Mon Jul 3 06:52:58 EDT 2006


Hi
thanx for replynig.
but functios are independent
and the button is inside one of the functions.
will u please reshape ur code and send it to me?
thank u.
Fredrik Lundh wrote:
> arvind wrote:
>
> > How to pass the variables defined inside the function to the another
> > function on click event of the button in Tkinter?
>
>      def the_function(master):
>
>          variable = ...
>
>          def callback():
>              print variable
> 
>          b = Button(master, command=callback)
> 
> </F>




More information about the Python-list mailing list