daily pastebin goal
79%
SHARE
TWEET

Untitled

a guest Jul 20th, 2017 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from Tkinter import *
  2. import tkMessageBox
  3.  
  4. master = Tk()
  5. master.wm_iconbitmap('info.ico')
  6. def Submit():
  7.     logUser = user.get()
  8.     logPass = passe.get()
  9.     if logUser == 'google' and logPass == 'earth':
  10.         print 'Success!'
  11.         tkMessageBox.showinfo(title="Login Success", message="You have succesfully logged in")
  12.     else:
  13.         print 'Login Failed.'
  14.         tkMessageBox.showwarning(title="Login Failure", message="Incorrect Info")
  15.    
  16.  
  17.  
  18. User = Label(master, text="Username")
  19. User.pack()
  20.  
  21. user = Entry(master)
  22. user.pack()
  23.  
  24. Pass = Label(master, text="Password")
  25. Pass.pack()
  26.  
  27. passe = Entry(master)
  28. passe.pack()
  29.  
  30. sub = Button(master, text="Login", command=Submit)
  31. sub.pack()
  32.  
  33. mainloop()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top