A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-February/033633.html below:

[Python-Dev] module extension search order

[Python-Dev] module extension search order - can it be changed? [Python-Dev] module extension search order - can it be changed?Guido van Rossum guido@python.org
Tue, 25 Feb 2003 10:26:51 -0500
>     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"?

No, I meant what I said.  Once the file is found, it will be tried
and if that fails, the other files won't be tried.  The idea was that
if the .so cannot be built, it won't be installed -- but the .py will
be there at all times.

> 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.

Right, that's what zipimport is for.

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



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4