import dll instead of pyd

jrh jonas.haulin at gmail.com
Fri Jul 25 08:51:03 CEST 2008


Yes it is in the same directory. The problem is it does not seem to
look for dll's at all. So is this by design, or am I missing
something?

On 25 Juli, 10:03, Nick Dumas <drako... at gmail.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Is this DLL in the same directory as your script? If not, is it part of
> your pythonpath? If neither are true, then you won't be able to import
> it, regardless of whether it's a good file or not.
>
>
>
> jrh wrote:
> > Hello,
>
> > From previous posts and documentation it seems python should be able
> > to import a module that is compiled into a .dll just as well as
> > a .pyd. I have a pyd that works fine, but after renaming it to dll the
> > import fails. Running python with -vv flag indicates it doesn't
> > actually look for the dll (see below). Has dll import been defeatured
> > in python?
>
> > Thanks!
>
> >>>> import _mydllpythonmodule
> > # trying _mydllpythonmodule.pyd
> > # trying _mydllpythonmodule.py
> > # trying _mydllpythonmodule.pyw
> > # trying _mydllpythonmodule.pyc
> > # trying C:\Python25\DLLs\_mydllpythonmodule.pyd
> > # trying C:\Python25\DLLs\_mydllpythonmodule.py
> > # trying C:\Python25\DLLs\_mydllpythonmodule.pyw
> > # trying C:\Python25\DLLs\_mydllpythonmodule.pyc
> > # trying C:\Python25\lib\_mydllpythonmodule.pyd
> > # trying C:\Python25\lib\_mydllpythonmodule.py
> > # trying C:\Python25\lib\_mydllpythonmodule.pyw
> > # trying C:\Python25\lib\_mydllpythonmodule.pyc
> > # trying C:\Python25\lib\lib-tk\_mydllpythonmodule.pyd
> > # trying C:\Python25\lib\lib-tk\_mydllpythonmodule.py
> > # trying C:\Python25\lib\lib-tk\_mydllpythonmodule.pyw
> > # trying C:\Python25\lib\lib-tk\_mydllpythonmodule.pyc
> > # trying C:\Python25\_mydllpythonmodule.pyd
> > # trying C:\Python25\_mydllpythonmodule.py
> > # trying C:\Python25\_mydllpythonmodule.pyw
> > # trying C:\Python25\_mydllpythonmodule.pyc
> > # trying C:\Python25\lib\site-packages\_mydllpythonmodule.pyd
> > # trying C:\Python25\lib\site-packages\_mydllpythonmodule.py
> > # trying C:\Python25\lib\site-packages\_mydllpythonmodule.pyw
> > # trying C:\Python25\lib\site-packages\_mydllpythonmodule.pyc
> > # trying C:\Python25\lib\site-packages\win32\_mydllpythonmodule.pyd
> > # trying C:\Python25\lib\site-packages\win32\_mydllpythonmodule.py
> > # trying C:\Python25\lib\site-packages\win32\_mydllpythonmodule.pyw
> > # trying C:\Python25\lib\site-packages\win32\_mydllpythonmodule.pyc
> > # trying C:\Python25\lib\site-packages\win32\lib
> > \_mydllpythonmodule.pyd
> > # trying C:\Python25\lib\site-packages\win32\lib\_mydllpythonmodule.py
> > # trying C:\Python25\lib\site-packages\win32\lib
> > \_mydllpythonmodule.pyw
> > # trying C:\Python25\lib\site-packages\win32\lib
> > \_mydllpythonmodule.pyc
> > # trying C:\Python25\lib\site-packages\Pythonwin
> > \_mydllpythonmodule.pyd
> > # trying C:\Python25\lib\site-packages\Pythonwin\_mydllpythonmodule.py
> > # trying C:\Python25\lib\site-packages\Pythonwin
> > \_mydllpythonmodule.pyw
> > # trying C:\Python25\lib\site-packages\Pythonwin
> > \_mydllpythonmodule.pyc
> > Traceback (most recent call last):
> >   File "<stdin>", line 1, in <module>
> > ImportError: No module named _mydllpythonmodule
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org
>
> iEYEARECAAYFAkiJNGwACgkQLMI5fndAv9hykgCcDf4cTZU0iDo+ELQ5aFGs9FIO
> 8GEAn3+egrPDtNrlbsssqti8YeZXXIeM
> =q31k
> -----END PGP SIGNATURE-----




More information about the Python-list mailing list