title: How can I pass arguments to Tkinter button's callback command?
body: <p>I got 2 buttons, respectively named 'ButtonA', 'ButtonB'.
  I want the program to print 'hello, ButtonA' and 'hello, ButtonB' if any button is clicked.
  My code is as follows:</p>
  
  <pre><code>def sayHi(name):
      print 'hello,', name
  
  root = Tk()
  btna = Button(root, text = 'ButtonA', command = lambda: text)
  btna.pack()
  </code></pre>
  
  <p>When I click ButtonA, error occurs, <code>text not defined</code>.</p>
  
  <p>I understand this error, but how can I pass ButtonA's text to lambda?</p>