When does a binary extension gets the file extension '.pyd' and when is it '.so'

Fredrik Lundh fredrik at pythonware.com
Sun Apr 6 04:34:17 EDT 2008


Steve Holden wrote:

>> for reference, here's what I get on Ubuntu 7.10, with the standard 
>> Python interpreter (2.5.1):
>>
>> $ python -c "import imp; print imp.get_suffixes()"
>> [('.so', 'rb', 3), ('module.so', 'rb', 3), ('.py', 'U', 1),
>> ('.pyc', 'rb', 2)]
>>
>> any Ubuntu gurus here that can sort this one out?
>>
> I wouldn't claim to be an Ubuntu guru but it seems as though the Ubuntu 
> team decide that you would be able to import extension module YYY either 
> from YYY.so or from YYYmodule.so. IF you are asking *why* then I'd have 
> to answer that I have no idea at all.

oh, the ".so" and "module.so" is standard Python behaviour (see my first 
post in this thread).  what I cannot figure out is how "llothar" has 
managed to get setup.py to build extensions that an Ubuntu Python cannot 
load, without noticing.

</F>




More information about the Python-list mailing list