Python GTK Spellcheck

PyGtkSpellCheck is a spellchecking library written in pure Python for Gtk based on Enchant. It supports both Gtk’s Python bindings, PyGObject and PyGtk, and for both Python 2 and 3 with automatic switching and binding autodetection. For automatic translation of the user interface it can use GEdit’s translation files.


  • Localized names of the available languages.
  • Supports word, line and multiline ignore regexes.
  • Supports ignore custom tags on Gtk’s TextBuffer.
  • Enable and disable of spellchecking with preferences memory.
  • Supports hotswap of Gtk’s TextBuffers.
  • PyGObject and PyGtk compatible with automatic detection.
  • Python 2 and 3 support.
  • As Enchant, support for Hunspell (LibreOffice) and Aspell (GNU) dictionaries.


Source distribution

PyPI package available at:

pip install pygtkspellcheck


Install packages:


Development repository is available at:

git clone git://

Or download last sources in a ZIP or Tarball file.

API Reference

The main object is called Spellchecker and can be associated with any GtkTextView:

This library also includes a utility module to unpack LibreOffice .oxt extension dictionaries (Hunspell). This is especially useful for MS Windows users to include dictionaries for this library. Use this to extract the Hunspell dictionaries out of the extension and then pass to the Spellchecker the path to the location of the extraction in the params argument with the key enchant.myspell.dictionary.path.


This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <>.