[Distutils] RFC : PEP 376 - egg.info

Tarek Ziadé ziade.tarek at gmail.com
Tue May 5 02:11:36 CEST 2009


On Tue, May 5, 2009 at 2:00 AM, David Lyon <david.lyon at preisshare.net> wrote:
>
>
> On Tue, 5 May 2009 01:58:57 +0200, Tarek Ziadé <ziade.tarek at gmail.com>
> wrote:
>
>> That is what entry points are providing : the ability to mark a code
>> locate anywhere in your installation
>> and to load it when needed in your execution context.
>
> ok - but don't we already have this in site.py ? inside the
> interpreter.
>
> From my reading, it already does just that every time the
> python interpreter starts up.

I am not sure to understand what you are explaining - when the python
interpreter starts up, it doesn't load every installed package
in memory. the loading happens when you do "import foo"

But entry points provides a way to tell you for example that the "bar"
function located in the "foo" module is a plugin,
*without having to load this module in your interpreter*, because this
info is writtent in a static text file located in the .egg-info
 directory. After, you will eventually load it (by using a load()
function in the entry point, that is basically an import statement)

Tarek

>
> David
>
>
>
>
>



-- 
Tarek Ziadé | http://ziade.org


More information about the Distutils-SIG mailing list