title: Not sure how to use a tkinter entry to run an if statement
body: <p>I have an Entry set up and I would like to run and if-statement if the entry is <code>==</code> the environment variable I have set up. I already have a button set up to print the input but I am unsure of how to use the input in an if-statement.</p>
  
  <pre><code>import os
  import base64
  from tkinter import *
  
  master = Tk()
  
  
  passwordinput = Entry(master, text ="Password")
  passwordinput.pack()
  
  def outputentry():
      input = passwordinput.get()
      print (input)
  
  printpassword = Button(master, text="Print", command = outputentry)
  printpassword.pack()
  
  password = os.environ.get('USERPASS')
  
  if input == password:
      print("Welcome")
      os.startfile('E:\Documents')
  else:
          print("Incorrect password")  
  
  master.mainloop()
  </code></pre>
  
  <p>I would like to enter the correct password which is defined in my environment variables and then run the if-statement if the passwords match.</p>