Question

I'm required to import a certain dll called 'NHunspell.dll' which is used for Spell Checking purposes. I am using Python for the software. Although I checked out several websites to properly use ctypes, I have been unable to load the dll properly.

When I use this code.

  from ctypes import *
  hunspell = cdll.LoadLibrary['NHunspell.dll']

I get an error

  hunspell = cdll.LoadLibrary['NHunspell.dll']
  TypeError: 'instancemethod' object has no attribute '__getitem__'

I guess it might a problem with the structure of the dll. But I have no idea how to import the dll properly.

Was it helpful?

Solution

Thanks @eryksun . But it still did not work. I instead used a Python wrapper for Hunspell called Pyhunspell. The actual link in PyPi does not work for Python 2.7 but it has been improved and upgraded in here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top