[Tutor] Dictionary blues...

Igor Riabtchuk igor.r at vodafone.net
Wed Mar 23 23:00:22 CET 2005

I posted the wrong code before. The code is:

from Tkinter import *

D={a:"tom", b:"dick", c:"harry"}

text.bind('<Key>', self.Conv)

def Conv(self,event):
    if D.has_key(event.keysym):
    return 'break'

The error message says wrong syntax...

What I am basically trying to do is to allow the output of dictionary values for each keyboard button pressed.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20050323/e796be00/attachment.html

More information about the Tutor mailing list