Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #49129

Unable to import NHunspell.dll using ctypes in Python

X-Received by 10.224.174.145 with SMTP id t17mr28766703qaz.4.1372141397986; Mon, 24 Jun 2013 23:23:17 -0700 (PDT)
X-Received by 10.50.2.102 with SMTP id 6mr538893igt.17.1372141397910; Mon, 24 Jun 2013 23:23:17 -0700 (PDT)
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!j2no575612qak.0!news-out.google.com!fv2ni168qab.0!nntp.google.com!j2no1759550qak.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.python
Date Mon, 24 Jun 2013 23:23:17 -0700 (PDT)
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=116.90.238.57; posting-account=-uNX9AoAAACjkg5D5rrzNjYYGZy7TYdv
NNTP-Posting-Host 116.90.238.57
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <23e633db-afbe-4edc-9291-5a9e242e86d0@googlegroups.com> (permalink)
Subject Unable to import NHunspell.dll using ctypes in Python
From akshay.ksth@gmail.com
Injection-Date Tue, 25 Jun 2013 06:23:17 +0000
Content-Type text/plain; charset=ISO-8859-1
Xref csiph.com comp.lang.python:49129

Show key headers only | View raw



Im required to import ha 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['Hunspellx64.dll']

I get an error

  hunspell = cdll.LoadLibrary['Hunspellx64.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.

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Unable to import NHunspell.dll using ctypes in Python akshay.ksth@gmail.com - 2013-06-24 23:23 -0700
  Re: Unable to import NHunspell.dll using ctypes in Python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-25 08:07 +0100
    Re: Unable to import NHunspell.dll using ctypes in Python akshay.ksth@gmail.com - 2013-06-25 00:32 -0700
      Re: Unable to import NHunspell.dll using ctypes in Python Dave Angel <davea@davea.name> - 2013-06-25 03:45 -0400
      Re: Unable to import NHunspell.dll using ctypes in Python Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2013-06-25 09:54 +0200
      Re: Unable to import NHunspell.dll using ctypes in Python Dave Angel <davea@davea.name> - 2013-06-25 09:55 -0400
  Re: Unable to import NHunspell.dll using ctypes in Python akshay.ksth@gmail.com - 2013-06-25 00:58 -0700
    Re: Unable to import NHunspell.dll using ctypes in Python Dave Angel <davea@davea.name> - 2013-06-25 10:05 -0400
  Re: Unable to import NHunspell.dll using ctypes in Python akshay.ksth@gmail.com - 2013-06-25 01:04 -0700
    Re: Unable to import NHunspell.dll using ctypes in Python Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2013-06-25 10:32 +0200
  Re: Unable to import NHunspell.dll using ctypes in Python akshay.ksth@gmail.com - 2013-06-25 07:52 -0700

csiph-web