title: tkinter - get button name?
body: <p>I'm trying to execute different code for each tkinter button - the names of which are not know until called from a list. gtk has get label (unfortunately I can't use gtk).</p>
  
  <p>How might I implement similar with tkinter?</p>
  
  <pre><code>def click_one(newbuttonname):
          try:
                  writethisdown = open("participantsmovedlog.txt", 'a')
          except:
                  pass
          rotatee = newbuttonname
          thispersonwasrotated(rotatee)
          writethisdown.close()
  </code></pre>
  
  <p>.... and meanwhile within the makebutton function:</p>
  
  <pre><code>for someuser in listofusers:
              username = someuser
              newbuttonname = username 
              newbuttonname = Tkinter.Button(win, text = newbuttonname, command = lambda:click_one(username))
              newbuttonname.pack()
  </code></pre>