[Python-Dev] Does Zip Importer have to be Special? (original) (raw)

Phil Thompson phil at riverbankcomputing.com
Fri Jul 25 11:36:18 CEST 2014


On 24/07/2014 7:26 pm, Brett Cannon wrote:

On Thu Jul 24 2014 at 2:12:20 PM, Phil Thompson <phil at riverbankcomputing.com> wrote:

On 24/07/2014 6:48 pm, Brett Cannon wrote: > IOW allowing for easy patching of Python is probably the best option I > can > think of. Would tweaking importlib.bootstrap.install() to accept > specified values for sys.metapath and sys.pathhooks be enough so that > you > can change the call site for those functions?

My importer runs under PathFinder so it needs sys.path as well (and doesn't need sys.metapath). sys.path can be set via PYTHONPATH, etc. so that shouldn't be as much of an issue.

I prefer to have Py_IgnoreEnvironmentFlag set.

Also I'm not clear at what point I would import my custom importer?

Phil



More information about the Python-Dev mailing list