Hi all, Please can anyone tell me how i bind the activation of a button with input from an entry widget. i know i should be using classes etc. but i don't understand them fully yet.. problem here is that no matter what i enter in the entry window it displays as password incorrect. from Tkinter import * password="trial" def reveal(): """Display message based on password""" contents=s if contents=="trial": print "password correct" else: print "password wrong" #mainroot=Tk()root.title("Password entry box")root.geometry("300x100")app=Frame(root)app.grid() #labelslbl=Label(app, text="Enter your password: ")lbl.grid(row=1, column=0) #create entry widgetse = Entry(root)e.grid(row=1, column=1)s=e.get() #create a submit buttonb=Button(root, text="SUBMIT", command=reveal)b.grid(row=0, column=2)
root.mainloop() thanks all,adrian
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor