I have written the following code
class pass_check(ABC):
from Tkinter import *
def __init__(self):
#------------------------------------------------------------------------
self.check=Tk()
self.user=''
ABC.__init__(self)
self.pass_key=StringVar()
self.E=Entry(self.check, bd=2, textvariable=self.pass_key)
self.E.place(x=0, y=0)
self.B=Button(self.check, text="Accept", command=self.check_pass(self.pass_key))
self.B.place(x=50, y=50)
self.check.mainloop()
def check_pass(fx):
n=fx.get()
if n=="25":
print "Thank u"
else:
print "Incorrect"
if __name__ == "__main__":
pass_check()
But I am getting the following errors can't understand how to get rid of them,
SyntaxWarning: import * only allowed at module level
And
Traceback (most recent call last):
File "C:\Python27\lib\lib-tk\Tkinter.py", line 1322, in configure
return self._configure('configure', cnf, kw)
File "C:\Python27\lib\lib-tk\Tkinter.py", line 1313, in _configure
self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
TclError: image "pyimage1" doesn't exist
Can anyone help me out