[Tutor] Dictionary blues...

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Wed Mar 23 23:18:02 CET 2005

On Wed, 23 Mar 2005, Igor Riabtchuk wrote:

> 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):
>       str=D[event.keysym]
>     self.text.insert(END,str)
>     return 'break'
> The error message says wrong syntax...

Hi Igor,

Can you show us the exact error message?  Copy and paste it, as well as
the "traceback", so we can figure out why it thinks there's a problem with

More information about the Tutor mailing list