FW: Need help with Tkinter bind statement

Mike Clarkson support at internetdiscovery.com
Fri Mar 9 15:54:37 EST 2001


On Tue, 6 Mar 2001 14:22:49 -0600, "Mellor, Mike"
<Mike.mellor at tbe.com> wrote:
>I have been working on an RPN calculator program for a while now, and 
>I am having problems with some bindings.  Here is a code snippet of 
>where I'm having trouble:
>
># Bindings
>xStack.bind('<+>', lambda event, fxn = 'y+x':Calc(fxn))
>xStack.bind('<->', lambda event, fxn = 'y-x':Calc(fxn)) # This is 
>causing an error

It's a Tcl subtlety/bug. 

<+> is really a shorthand for <Key-+>
But <-> doesn't seem to parse, so use <Key--> instead.

Mike.



More information about the Python-list mailing list