[Python-Dev] Towards a Python based import scheme

James C. Ahlstrom jim@interet.com
Thu, 16 Sep 1999 15:09:57 -0400


Gordon McMillan wrote:

> So I don't think there's a need for one canonical do-everything
> importer (or archive format). PYTHONPATH is outside any
> particular importer. Effectively, you can use a chain of
> importers to replace PYTHONPATH. So the platform specific
> modules might be found by one particular importer. In other
> words, I think it's more effective to specialize individual
> importers and chain them up than it is to try to create an
> overly-generalized importer.

Greg agrees with you so I defer to the experts on importers.
The feature is meant to support a chain.

Greg wrote:

> The .pyl format was discussed a bit on the distutils-sig list and "sort
> of" accepted as an okay format for jamming a bunch of modules into a
> single file.
> [by "sort of", I mean that the small group who participated in the
> discussion were okay with it :-); it is a great, minimalist format, so
> it probably won't please people who like a ton of features in a file
>format :-) ]

But I still disagree on the .pyl file format.  If there is no Standard
Format and everyone is linking in his own importer, then we will have
exactly the same situation we have now with PYTHONPATH and novel
import hooks.  There should be a Standard Format to fix this
problem.  In particular, package authors should be able to publish
packages as PYL files and expect them to be usable as is with
no further effort.  Sysadmins should be able to manage everything
PYTHONPATH does with a small (one?) number of PYL files and in
a standard way.

Jim Ahlstrom