title: Python/ Tkinter - Button to run function with multiple arguments not working
body: <p>I am trying to write a program that will display 4 rows of 2 columns with column 0 being labels and column 1 being entries. Then, pass those 4 integer entries through as arguments into a function when a button is left clicked. Here is my code so far:</p>
  
  <pre><code>from tkinter import *
  
  root = Tk()
  
  
  class ClassName():
  
       def __init__(self, master):
  
         self.run_button = Button(self.master, text="Button Text", bg="green", fg="black", 
                                 command="HERE IS WHERE I NEED HELP")
         self.run_button.grid(row=4, columnspan=2)
  
         self.label1 = Label(master, text="Entry 1").grid(row=0, sticky=E)
         self.label2 = Label(master, text="Entry 2").grid(row=1, sticky=E)
         self.label3 = Label(master, text="Entry 3").grid(row=2, sticky=E)
         self.label4 = Label(master, text="Entry 4").grid(row=3, sticky=E)
  
         self.entry1 = Entry(master).grid(row=0, column=1, sticky=W)
         self.entry2 = Entry(master).grid(row=1, column=1, sticky=W)
         self.entry3 = Entry(master).grid(row=2, column=1, sticky=W)
         self.entry4 = Entry(master).grid(row=3, column=1, sticky=W)
  </code></pre>
  
  <p>I want to then take the 4 entries and pass them through a different function called <code>the_function</code>. All <code>the_function</code> does is print out something based on the values of the 4 entries. So my remaining code looks like this:</p>
  
  <pre><code>def the_function(self, a, b, c, d):
  #    Ensure a, b, c, and d are integers, 
  #    do some math on the numbers and print something out based on the
  #    values of a, b, c and d.
  
  irrelevant_variable = ClassName(root)
  root.mainloop()
  </code></pre>
  
  <p>The function works properly without the GUI but I cannot figure out how to create a button that takes <code>self.entry1</code> and passes it through as <code>a</code> in <code>the_function</code>. </p>
  
  <p>Other posts have lead me to think I should use the <code>lambda</code> command, but I'm not sure how this would work within this function.</p>