title: Tkinter and ttk python2.7
body: <p>i found this code online and i wanted to try it out because im trying to figure out how to have my label to change while i type things into my messagebox. I tried the getmethod but i have been struggling with using it. So i found this code and when i tried it i get the error that ttk is undefined but it clearly is.</p>
  
  <pre><code>from Tkinter import *
  from ttk import *
  
  def calculate(*args):
      try:
          value = float(feet.get())
          meters.set((0.3048 * value * 10000.0 + 0.5)/10000.0)
      except ValueError:
          pass
  
  root = Tk()
  root.title("Feet to Meters")
  
  mainframe = ttk.Frame(root, padding="3 3 12 12")
  mainframe.grid(column=0, row=0, sticky=(N, W, E, S))
  mainframe.columnconfigure(0, weight=1)
  mainframe.rowconfigure(0, weight=1)
  
  feet = StringVar()
  meters = StringVar()
  
  feet_entry = ttkEntry(mainframe, width=7, textvariable=feet)
  feet_entry.grid(column=2, row=1, sticky=(W, E))
  
  ttk.Label(mainframe, textvariable=meters).grid(column=2, row=2, sticky=(W, E))
  ttk.Button(mainframe, text="Calculate", command=calculate).grid(column=3, row=3, sticky=W)
  
  ttk.Label(mainframe, text="feet").grid(column=3, row=1, sticky=W)
  ttk.Label(mainframe, text="is equivalent to").grid(column=1, row=2, sticky=E)
  ttk.Label(mainframe, text="meters").grid(column=3, row=2, sticky=W)
  
  for child in mainframe.winfo_children(): child.grid_configure(padx=5, pady=5)
  
  feet_entry.focus()
  root.bind('&lt;Return&gt;', calculate)
  
  root.mainloop()
  </code></pre>
  
  <p>Traceback (most recent call last):
    File "tk8.py", line 15, in 
      mainframe = ttk.Frame(root, padding="3 3 12 12")
  NameError: name 'ttk' is not defined</p>