title: Checking username and password for python (Tkinter)
body: <p>I am creating a login system in python using Tkinter and have been able, write to the text file with a username and password in my Register window. However, inside of my Login window, I am not sure how to go about checking whether or not the username or password entered is correct or not? </p>
  
  <pre><code>#Register window code
      self.newNameEntry = Entry(self.master,
                       highlightcolor="grey",
                       highlightthickness=2,
                       highlightbackground="#FF4500")
  
      self.newNameEntry.place(x=245, y=100)
  
      self.newPasswordEntry = Entry(self.master,
                       highlightcolor="grey",
                       highlightthickness=2,
                       highlightbackground="#FF4500")
  
      self.newPasswordEntry.place(x=245, y=140)
  def signUp(self):
      text = self.newNameEntry.get() + " " + self.newPasswordEntry.get() + "\n"
      with open("LoginDetails.txt", 'a')as f:
          f.write(text)
  #Login window code
     self.nameEntry = Entry(self.master,
                       highlightcolor="grey",
                       highlightthickness=2,
                       highlightbackground="#FF4500")
  
     self.nameEntry.place(x=245, y=100)
  
     self.passwordEntry = Entry(self.master,
                       highlightcolor="grey",
                       highlightthickness=2,
                       highlightbackground="#FF4500")
     self.loginBtn = Button(self.master,
                     text="Login",
                     fg="white",
                     bg="#282828",
                     command = self.openHubWindow)#calls the function
     self.loginBtn.place(x=298, y=192)
     self.passwordEntry.place(x=245, y=140)
  def openHubWindow(self): #Where I want the login checks to happen
            self.master.withdraw()
            root2 = Toplevel(self.master)
            hub = HubWindow.TheHub(root2)
  </code></pre>