importing from .pyd

John Machin sjmachin at
Fri Aug 29 16:15:09 CEST 2008

On Jul 14, 9:11 pm, Kay Schluehr <kay.schlu... at> wrote:
> On 14 Jul., 06:03, moijes12 <moije... at> wrote:
> > Error i get is
> > ImportError: DLL load failed: The specified module could not be found.
> Notice that the message clearly indicates that Python found the module
> but failed to load it i.e. performing a LoadLibrary() which yielded a
> NULL pointer.

"The specified module could not be found" clearly indicates that
"Python found the module"???

I suggest a more descriptive and (Monty) Pythonic error message: "I
found a foo.pyd which looks like a DLL but it contains no 'initfoo'
entrypoint therefore I throw an ImportError and a bucketful of pig
slops in your general direction."

More information about the Python-list mailing list