python24.zip

Robin Becker robin at SPAMREMOVEjessikat.fsnet.co.uk
Mon May 23 18:58:22 EDT 2005


Martin v. Löwis wrote:
> Robin Becker wrote:
> 
>>ie if we have N importers and F leading failure syspath entries before
>>the correct one is found do we get order N*F failed stats/opens etc etc?
> 
> 
> No. Each path hook is supposed to provide a decision as to whether this
> is a useful item on sys.path only once; the importer objects themselves
> are then cached (with some operation to clear the cache). Each path hook
> may apply its own algorithm, e.g. looking at the syntactical structure
> or the type of the sys.path item, so not all of them need stat/open
> to determine whether they support the item.
> 
> The multiplicative behaviour rather results from the different type of
> modules: each path item may carry .py, .pyc, .so, module.so, etc.
> 
> Regards,
> Martin
> 
if the importers are tested statically how does a filesystem path ever manage
to get back into the loop if it was ever found missing? In other words if
things (eg python24.zip) are found not importable/usable in one pass how do
they get reinstated?
-- 
Robin Becker



More information about the Python-list mailing list