newbie question, but please i need help
i just started learning gui programming on python, been getting this error on a code am writing concerning uising the get() method to read an integer from my entry box
from Tkinter import *
root=Tk()
var=StringVar()
label=Label(root, textvariable=var, relief=RAISED)
var.set("converter")
label.pack()
L1=Label(text="x:")
L1.pack(side= LEFT)
E1=Entry(bd=5)
E1.pack()
content =int(E1.get())
import Tkinter
def m_km(content):
km=content/1000
tkMessageBox.showinfo("Answer" , "%d km" %(km))
B=Tkinter.Button(text="metres to kilometres", command= m_km)
B.pack(side= RIGHT)
mainloop()