[Python-Dev] Re: .DLL vs .PYD search order

Fredrik Lundh fredrik@pythonware.com
Fri, 3 Dec 1999 15:14:00 +0100


MAL wrote:
> > IMHO, we should retreat to a more centralized interface,
> > one which more resembles a manager rather than the agent
> > interface implemented in imputil.py. Add-ons can then
> > register themselves to say "hey, I can handle pyz-archives"
> > or "I know how to import .so modules" or "I provide a
> > search function which you can call to have me scan
> > my module container (directory, web-site, archive)".

but why?  in my small-minded view of how python
works, an importer carries out a very simple task:

    given a name, check if you have a
    module with that name, and install
    it.  if you cannot, fail (in which case
    python asks the next importer along
    the path).

why do you have to complicate things beyond that?
why not just let Python provide a few base classes
and mixins for people who want to create custom
importers, and be done with it?

rationale, please.

</F>