drowning newbie

xtian xtian at toysinabag.com
Sat Mar 13 05:37:05 EST 2004


"elizabeth fletcher" <fletcher at worldnet.att.net> wrote in message news:<T4v4c.11264$H44.200022 at bgtnsc04-news.ops.worldnet.att.net>...
> Actually, I have the .pyd file (which I understand is basically a dll file)
> and placed it in the DLL directory in the PYTHON23 directory.  In the
> interactive window I type "import calldll" and I get an error (ImportError:
> DLL load failed: The specified module could not be found)    I shoudn't if
> the dll is installed correctly.....right?

A .pyd extension module can be imported as long as it's on the module
search path - check that by entering:

>>> import sys
>>> print sys.path

It seems that, by default, the python23\DLLs directory should be
included in sys.path. The error says DLL load failed, which implies
that the pyd *was* found (otherwise, how would Python know it was a
DLL?), and that it's not the search that's the problem.

Are you sure that the version of the calldll.pyd library you have is
the correct one for Python 2.3? Binary modules are version-specific. I
can't see a 2.3 version available - did you compile it yourself?

Do you need to use calldll specifically? I think ctypes
(http://starship.python.net/crew/theller/ctypes/) provides very
similar functionality, and it's definitely available for 2.3. It comes
with an executable installer, which should make things a bit easier.
:)

HTH,
xtian



More information about the Python-list mailing list