import dll instead of pyd

Fredrik Lundh fredrik at pythonware.com
Fri Jul 25 09:20:16 CEST 2008


jrh wrote:

> 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?

looks like that was removed in 2.5; from Misc/NEWS:

- On Windows, .DLL is not an accepted file name extension for
   extension modules anymore; extensions are only found if they
   end in .PYD.

which is easily confirmed:

Python 2.4.3
 >>> import imp
 >>> imp.get_suffixes()
[('.pyd', 'rb', 3), ('.dll', 'rb', 3), ('.py', 'U', 1),
('.pyw', 'U', 1), ('.pyc', 'rb', 2)]

Python 2.5
 >>> import imp
 >>> imp.get_suffixes()
[('.pyd', 'rb', 3), ('.py', 'U', 1), ('.pyw', 'U', 1),
('.pyc', 'rb', 2)]

(the DLL support was a compatibility thing anyway, so I guess removing 
it after 10+ years is a reasonable thing to do...)

</F>




More information about the Python-list mailing list