[Python-Dev] New and Improved Import Hooks

Michael Hudson mwh@python.net
05 Dec 2002 13:43:38 +0000


"Fredrik Lundh" <fredrik@pythonware.com> writes:

> Guido wrote:
> 
> > Obviously if the data files get stored in the zip file too, the code
> > searching for it needs to be made zip file aware; but if zip files are
> > used to provide *other* libraries, that shouldn't break code that
> > looks for data files along sys.path.
> 
> as I might have mentioned before, it would be really nice if custom
> importers supported optional "load_data" and "get_module_names"
> hooks.

I haven't seen that mentioned before, but it certainly would be
useful.

(pyrepl currently has some nasty code to allow tab completion of
import statements, bits of which I'd be most happy to see the back
of).

Cheers,
M.

-- 
  Hey, if I thought I was wrong, I'd change my mind.  :)
                                    -- Grant Edwards, comp.lang.python