title: Python 2.7 : Tkinter, How to use the bind method?
body: <p>I'm trying to create a Scrabble game with Python. I'd like to display the points that the word worth when the user is typing the word. 
  I already asked this question as I didn't know what method to use. As I discovered which method to use, and my question is about how to use this method, I think this deserve a new question.
  My problem is that I created a function called <code>bind_entry(event)</code> that is supposed to set a label  every time the user type a letter. But the function <code>bind_entry(event)</code>doesn't know the label to set and the entry where the word is. </p>
  
  <p>Here is my code : </p>
  
  <pre><code>#this the function creating the label
  def create_variabletext_intlabel(root,col,row):
      val=IntVar()
      label=Label(root,textvariable=val)
      label.grid(column=col,row=row)
      return val, label
  
  #this is the function creating the entry
  def create_entry_string(root,width,col,row,columnspan,rowspan):
      val=StringVar()
      entry=ttk.Entry(root,width=width,textvariable=val)
      entry.grid(column=col,row=row,columnspan=columnspan,rowspan=rowspan)
      entry.bind("&lt;Any-KeyPress&gt;",bind_entry)
      #Here is my problem, when I call the function bind_entry.
      return val, entry
  
  def bind_entry(event):
      label.set(m.counting_point(char(event))) 
      # m.counting_point() is a function counting the word's points
      # my problem is that the function doesn't know yet the label. 
      # I don't know how to call the label. 
  
  # I call the function create_entry_string in another file initiating
  # all the widget for the GUI
  val_entry_word, entry_word =g.create_entry_string(root,15,1,1,1,1)
  
  # I call the function create_variabletext_intlabel in another file
  # initiating all the widget for the GUI
  val_points,label_points=g.create_variabletext_intlabel(root,1,2)
  </code></pre>
  
  <p>I just noticed that the function <code>m.counting_points()</code> will count only the letter that is typed by the user. Here I should call <code>val_entry_word</code>.</p>
  
  <p>So here is my question : </p>
  
  <p>As <code>val_entry_word</code> and <code>val_points</code> are created in a function in another file How could I call <code>val_entry_word</code> and <code>val_points</code> in the function <code>bind_entry()</code> ?</p>