-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
I've been experimenting with using the Gspell spell checking library from Python. The only difficulty I've encountered is with the value returned by Gspell.Checker.get_suggestions. When using PyGObject I get a Python list of strings, as expected. With pgi I get an object of type pgi.clib.glib.GSListPtr.
I've found a workaround as follows:
suggestions = checker.get_suggestions(word, -1)
result = []
for i in range(suggestions.length):
c_str = ctypes.c_char_p(suggestions.nth_data(i))
result.append(c_str.value.decode('utf_8'))
return result
Metadata
Metadata
Assignees
Labels
No labels