quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Hawthorne <bri...@exelixis.com>
Subject Re: more robust import
Date Tue, 30 Dec 2003 21:45:25 GMT

> Will this correctly replace the import function for all modules, or only
> modules that import mod_python.apache?

this replaces the core import function (__builtin__.__import__), so it
affects all imports.  since it resides in mod_python.apache however, that
must be imported first for the change to take effect.  ideally, this code
would go somewhere closer to the interpreter core (like the site or
sitecustomize modules which get run at interpreter startup), but i have
not been brave enough to drop it there yet.  more ideally, this
functionality would be incorporated into python itself, since it seems the
default import behaviour in this case is more of a bug than a feature.
also, the way i've implemented it is to basically let the default import
do the work, make it's mess, and then clean up after it... would really be
better to just not make the mess in the first place.

brian hawthorne

exelixis, inc.

View raw message