On 9/21/06, Paul Moore <[EMAIL PROTECTED]> wrote: > On 9/21/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > Isn't the main problem how to specify a bunch of these in the > > environment? Or can this be done through .pkg files? Those aren't > > cheap either though -- it would be best if the work was only done when > > the package is actually needed. > > Hmm, I wasn't thinking of the environment. I pretty much never use > PYTHONPATH, so I tend to forget about that aspect.
As Phillip understood, I meant the environment to include the filesystem (and on Windows, the registry -- in fact, Python on Windows *has* exactly such a mechanism in the registry, although I believe it's rarely used these days -- it was done by Mark Hammond to support COM servers I believe.) > I was assuming an > importer object with a "register(package_name, filesystem_path)" > method. Then register the packages you want in your code, or in > site.py. Neither is an acceptable method for an installer tool (e.g. eggs) to register new packages. it needs to be some kind of data file or set of data files. > But yes, you'd need to consider the environment. Possibly just have an > initialisation function called at load time (I'm assuming the new hook > is defined in a system module of some sort - I mean when that system > module is loaded) which parses an environment variable and issues a > set of register() calls. os.environ is useless because there's no way for a package installer to set it for all users. -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com