Question about Tkinter

Alex Martelli aleaxit at yahoo.com
Fri Aug 10 10:46:46 CEST 2001


"Benjamin Wu" <chase at gnuchina.org> wrote in message
news:9l03s7$6q9f0$1 at ID-54723.news.dfncis.de...
> When I use Tkinter, I met a question as following:
> I create three buttons and thire callback function
> is the same, how to know which button active callback
> function when one of they pressed?
>
> Anyone can help me?

Use different callables for the callbacks -- if it must be
the same function, curry the function with different
preset arguments -- see for example
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52549
about how to do currying in Python.


Alex






More information about the Python-list mailing list