[Python-Dev] module extension search order - can it be changed?

Guido van Rossum guido@python.org
Tue, 25 Feb 2003 09:58:18 -0500


> While trying to figure out why so many stat() calls fail before locating a
> module, it occurred to me that since most modules are written in Python it
> makes sense to consider ".py" files before ".so" and "module.so" files.
> Would changing the search order be possible or would it break something?

I don't know if it would break something, but it was certainly
intended as a feature: you could have an extension and a .py module
in the same directory, the .py module would be used as a fallback if
the .so cannot be built.

--Guido van Rossum (home page: http://www.python.org/~guido/)