title: TypeError: leftClick() missing 1 required positional argument: 'password'
body: <p>I am new to Python, and am trying to create a log in window. When the user types in their username and password, the program will retrieve the set username and password that was saved into a text file, and if they match the user will be able to use the program. However, I keep getting this message when trying to run the program. Here is my code:</p>
  
  <pre><code>    from tkinter import *
      login = Tk()
      Label(login, text ="Username").grid(row = 0)
      Label(login, text ="Password").grid(row = 1)
  
      username = StringVar()
      password = StringVar()
  
      i1 = Entry(login, textvariable=username)
      i2 = Entry(login, textvariable=password, show = "*")
  
      i1.grid(row = 0, column = 1)
      i2.grid(row = 1, column = 1)
  
      def leftClick(username, password):
              f = open('godhelpme.txt', 'r')
              file = open('some_file.txt', 'r')
              if username == (f.read()):
                      if password == (file.read()):
                              print ("HELLOOOO")
                      else:
                              print ("invalid username/password")
              else: print ("invalid username/password")
  
  
      button2 = Button(login, text = "Log In", command = save)
      button2.grid(columnspan = 2)
      button2.bind("&lt;Button-1&gt;", leftClick)
  
  
  
      login.mainloop()
  </code></pre>
  
  <p>This is how I tried to put two functions for my button</p>
  
  <pre><code>    from tkinter import *
      from tkinter import ttk
  
  
      def win1():
          mainframe = ttk.Frame(root, padding = '3 3 12 12')
          mainframe.grid(column = 0, row = 0, sticky = (N, W, E, S))
          mainframe.columnconfigure(0, weight = 1)
          mainframe.rowconfigure(0, weight = 1)
  
          ttk.Button(mainframe, text = 'Register', command = register).grid(
              column = 1, row = 1, sticky = W)
          ttk.Button(mainframe, text = 'Log In', command = login).grid(
              column = 1, row = 2, sticky = W)
  
          root.mainloop()
  
      def combine_funcs(save, quit):
          def combined_func(save, quit):
              for f in funcs:
                  f(save, quit)
          return combined_funcs
  
      def quit():
          root.withdraw()
  
      def register():
          quit()
          def save():
              import json as serializer
              with open('godhelpme.txt', 'w') as f:
                  serializer.dump(username.get(), f)
              with open('some_file.txt', 'w') as f:
                  serializer.dump(password.get(), f)
              register.quit()
  
          register = Tk()
          Label(register, text ="Username").grid(row = 0)
          Label(register, text ="Password").grid(row = 1)
  
          username = StringVar()
          password = StringVar()
  
          e1 = Entry (register, textvariable=username)
          e2 = Entry (register, textvariable=password, show= "*")
  
          e1.grid(row = 0, column = 1)
          e2.grid(row = 1, column = 1)
  
  
          button1 = Button(register, text = "Register", command = combined_funcs(save, quit))
          button1.grid(columnspan = 2)
          button1.bind("&lt;Button-1&gt;")
  
          register.mainloop
  </code></pre>