In this video I’ll show you how to build a very quick spell checker app with Tkinter and Python.

We’ll use the TextBlob Library to check our spelling in a tkinter text widget.

TextBlob will fix any spelling errors, and then we’ll update the Text widget with the corrected text.

Python Code: spell.py
(Github Code)

from tkinter import *
from textblob import TextBlob

root = Tk()
root.title("Spell Checker")
root.iconbitmap('c:/tkinter.com/codemy.ico')
root.geometry('500x500')

def spellerize():
	# Grab text from box
	get_text = my_text.get(1.0, END)
	# Delete TextBox Text
	my_text.delete(1.0, END)

	# Convert text to blob
	blobby = TextBlob(get_text)
	# fix spelling errors
	my_text.insert(1.0, blobby.correct())


# Build GUI
my_text = Text(root, width=50)
my_text.pack(pady=20)

my_button = Button(root, text="Fix Spelling Errors", command=spellerize)
my_button.pack(pady=20)


root.mainloop()


John Elder

John is the CEO of Codemy.com where he teaches over 100,000 students how to code! He founded one of the Internet's earliest advertising networks and sold it to a publicly company at the height of the first dot com boom. After that he developed the award-winning Submission-Spider search engine submission software that's been used by over 3 million individuals, businesses, and governments in over 42 countries. He's written several Amazon #1 best selling books on coding, and runs a popular Youtube coding channel.

View all posts

Add comment

Your email address will not be published. Required fields are marked *

John Elder

John is the CEO of Codemy.com where he teaches over 100,000 students how to code! He founded one of the Internet's earliest advertising networks and sold it to a publicly company at the height of...