Precedence of py, pyd, so, egg, and folder modules/packages when importing

Pascal Chambon chambon.pascal at
Sat Mar 20 12:31:47 CET 2010


I've run into a slight issue when turning my package hierarchy into a 
parallel hierarchy of compiled cython extensions. Fue to the compilation 
process, pure python and C modules must have the basename, and they're 
located in the same folders.

Is there any way for me to ensure that, if both modules sets are 
installed by an user, the compiled, faster module will ALWAYS be 
imported instead of the pure python one ? Or am I forced to remove 
pure-python sources when cython ones must be used ?

More generally, is there any certainty about the precedence of the misc. 
module types, when several of them are in the same path ? I have found 
nothing about it online.

Thanks for the attention,

More information about the Python-list mailing list