Newbie question - TclError

Simon Brunning sbrunning at
Mon May 15 08:24:32 EDT 2000

I've been looking at the 'Getting started with Python' article at
_p.html>), and I'm having a problem getting one of the examples
( working. The code is as follows:

from Tkinter import *
from math import *

def evaluate(event):
        label['text'] = "Result:  " + str(eval(expression.get()))

frame = Frame(None)

entry = Entry(frame)
entry['textvariable'] = expression = StringVar()
entry.bind("", evaluate)

label = Label(frame)

button = Button(frame, text = "Submit", command = evaluate)


I'm getting the error message 'TclError: no events specified in
binding'. I've had a hunt round the documentation - if there is an
answer in there, *I* can't find it.

Anyone going to take pity on a frustrated newbie?

Simon Brunning
TriSystems Ltd.
sbrunning at
The opinions expressed are mine, and are not necessarily those of my
employer. All comments provided "as is" with no warranties of any
kind whatsoever.

More information about the Python-list mailing list