Newbie question - TclError
Fredrik Lundh
effbot at telia.com
Wed May 17 10:51:30 EDT 2000
Simon Brunning <sbrunning at trisystems.co.uk> wrote:
> http://www.sunworld.com/sunworldonline/swol-02-1998/swol-02-python_p.html
> ...
> entry.bind("", evaluate)
if you look at the HTML source, you'll find that the line was
supposed to be:
entry.bind("<Key-Return>", evaluate)
but the script is still buggy; to make the "submit" button
work, you have to change the evaluate command to:
def evaluate(event=None):
label['text'] = "Result: " + str(eval(expression.get()))
</F>
<!-- (the eff-bot guide to) the standard python library:
http://www.pythonware.com/people/fredrik/librarybook.htm
-->
More information about the Python-list
mailing list