Pythonwin not loading DLL, should I change extensions by .pyo or pyd?

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Mon Nov 17 16:55:40 EST 2008


En Mon, 17 Nov 2008 13:01:11 -0200, Pekeika  
<m.echavarriagregory at umiami.edu> escribió:

> Python 2.5 doesn't support/load .dll anymore. Is PythonWin 2.5 the
> same case?
>
> If a .DLL file is not loading, should I change its extension for it to
> work?
> What extensions should be now, .pyo, .pyd, etc? which one?
> What is the meaning of each extension?

Python supports being extended using "extension modules"; on Windows they  
are dynamic libraries (DLL). Before 2.5, the extensions ".dll" and ".pyd"  
were both valid; starting with 2.5, only files ending in ".pyd" are  
recognized.
Note that this applies to extension modules *only*, not generic DLLs.
All binary packages targeted to 2.5 use the right name for their extension  
modules, at least all that I know of. You don't have to rename anything.

A .pyo file is a totally different thing; it's a compiled Python source  
(like a .pyc) but with optimization turned on.

-- 
Gabriel Genellina




More information about the Python-list mailing list