title: Time delay Tkinter
body: <p>I'd like to make a graphic window in PyDev (Eclipse) python 2.75. </p>
  
  <p>I've done few things but I'd like to make an "entrance" "blink". It's Tests the user input. 
  If it's an integer it should blink green for a second, and then turn into white. But if it's a string of something else it should blink red, and then turn into white. I've used a <code>time.sleep()</code> but it doesn't work as I'd like to.</p>
  
  <p>Here is my code for this action:</p>
  
  <pre><code>def sprawdzam():
  
      z = e.get()
      try:
          z = int(z)
          e.config(bg = 'green')
          time.sleep(2)
          e.config(bg = 'white')    
  
      except:
          l.config(bg = 'red')
          time.sleep(2)
          e.config(bg = 'white')
  </code></pre>