title: Tkinter: set StringVar after <Key> event, including the key pressed
body: <p>Every time a character is entered into a <code>Text</code> widget, I want to get the contents of that widget and subtract its length from a certain number (basically a "you have x characters left" deal). </p>
  
  <p>But the <code>StringVar()</code> is always one event behind. This is, from what I gather, because the event is processed before the character is entered into the Text widget. This means that if I have 3 characters in the field and I enter a 4th, the <code>StringVar</code> is updated but is still 3 characters long, then it updates to 4 when I enter a 5th character. </p>
  
  <p>Is there a way to keep the two in line?</p>
  
  <p>Here's some code. I removed irrelevant parts.</p>
  
  <pre><code>def __init__(self, master):
      self.char_count = StringVar()
      self.char_count.set("140 chars left")
  
      self.post_tweet = Text(self.master)
      self.post_tweet.bind("&lt;Key&gt;", self.count)
      self.post_tweet.grid(...)
  
      self.char_count = Label(self.master, textvariable=self.foo)
      self.char_count.grid(...)
  
  def count(self):
      self.x = len(self.post_tweet.get(1.0, END))
      self.char_count.set(str(140 - self.x))
  </code></pre>