GUI python
I can't get an entry and apply a fucnction to it using a button.
here is the code, it is a spell checking program that takes a text and shows what are the spelling mistakes in it:
from tkinter import *
from tkinter import messagebox
import nltk
from nltk.corpus import words
def spellchecker(s):
x=words.words()
z=s.split()
for i in z:
if i.lower() in x:
pass
else:
print("{} is not in dic.".format(i))
top = Tk()
top.geometry('800x800')
top.title("Hello Window")
b=Button(text="Hello", command=spellchecker, bg="red", fg="white")
b.place(x=400,y=600)
E=Entry(top)
E.place(x=10,y=100)
top.mainloop()