title: Audio quiz with Tkinter
body: <p>I'd like to create a simple quiz with Tkinter (Python 2.7). I have a list of audios and for each of them I want to have the following:</p>
  
  <ol>
  <li>A <em>button</em> that reproduces the audio.</li>
  <li>An <em>entry</em> where the user can introduce any text.</li>
  <li>A <em>label</em> displaying "Incorrect" by default and "Correct!" whenever the text in the entry is the title of the song in the audio.</li>
  </ol>
  
  <p>I managed to create the three objects, but I'm having a hard time trying to update the label according to the entry text: there are many references around but I couldn't get it working. I guess I do not understand well how the loop works and when events are triggered.</p>
  
  <p>Could you please provide a minimal example that does what I intend to? I provide my code below, but it is very likely to be bloated (I'm totally novice to Tkinter and to object oriented programming) since I basically built it from an existing example in the Internet:</p>
  
  <pre><code>#!/usr/bin/env python
  #encoding=utf-8
  
  import Tkinter as tk
  import vlc
  
  tk.Tk()
  var_entry= tk.StringVar()
  var_label= tk.StringVar()
  
  class Application(tk.Frame):
      def __init__(self, master=None):
          tk.Frame.__init__(self, master)
          self.grid()
          self.createWidgets()
  
      def createWidgets(self):
  
          self.audio= tk.Button(self,text='Play Audio',command=lambda:vlc.MediaPlayer('./audios/my_audio.mp3').play())
          self.audio.grid()
  
          self.entry = tk.Entry(self,width=50,textvariable=var_entry)
          self.entry.grid()
  
          var_label.set('Correct!\n' if var_entry.get()=='my_audio_title' else 'Incorrect\n')
          self.label = tk.Label(self,textvariable=var_label)
          self.label.grid()
  
          self.quitButton = tk.Button(self, text='Quit',command=self.quit)
          self.quitButton.grid()
  
  app = Application()
  app.master.title('Audio Quiz')
  app.mainloop()
  </code></pre>
  
  <p>I'm sure that the line starting by <code>var_label.set</code> is missplaced, but I don't really know where I should write it and how to make the update for the label.</p>
  
  <p>Thanks in advance.</p>