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

Skip Montanaro skip@pobox.com
Tue, 25 Feb 2003 09:12:53 -0600


    Skip> [check .py before .so]

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

This doesn't quite make sense to me.  Instead of ".so cannot be built" did
you mean ".so cannot be imported"?

In any case, the current solution to my underlying problem (so many failing
stat() calls during module import) appears to be to create
$prefix/python23.zip and populate it with the contents of the standard
library using zipfile.PyZipFile.

Skip