I'm trying to make a simple calculator with python... Basically, two text fields, 4 buttons and a label... Each string is converted to a float, and each button corresponds to a math operator (+-*/).. when, for example, the * button is pressed, it executes the "multply" function which creates a label displaying the result... I know I'm gonna have trouble with different data types, but I'm having another problem... The function executes without the button being pressed, so of course it doesn't work (no value to multiply...) I simplified the function to just create a label with the first value to sort that problem out before tackling the math itself, but I can't figure it out...

here's the code:

import Tkinter

root=Tkinter.Tk()

tv=Tkinter.StringVar()
ty=Tkinter.StringVar()


Tkinter.Entry(textvariable=tv).pack()
Tkinter.Entry(textvariable=ty).pack()

def multiply(v,y):
....... Tkinter.Label(text=v).pack()
....... return None

Tkinter.Button(text="Quit",command=root.quit).pack ()
Tkinter.Button(text="+").pack()
Tkinter.Button(text="-").pack()
Tkinter.Button(text="*",command=multiply(tv,ty)).p ack()
Tkinter.Button(text="/").pack()

Tkinter.mainloop()