title: How to get the variable name of a button I have just clicked, tkinter
body: <p>I am currently programming a game with a field of buttons, each with a unique variable name. Each button is part of a class "Space" with several attributes.  Each button has the same command associated with it: "move()".  When I click a button, I want the code to get the attributes of that specific button using a ".getM()" function. My code for move is below, it is not complete. How do I assign the button name to var.?</p>
  
  <pre><code>def move():
      var = "???????"
      mGridv = var.getM()
      iGridv = var.getI()
      playv = var.getPlay()
  
      if playv != None:
          message = "This play is invalid"
  </code></pre>