On 08:24 pm, [EMAIL PROTECTED] wrote:
On Mon, Oct 27, 2008 at 12:31 PM,  <[EMAIL PROTECTED]> wrote:
On 07:24 pm, [EMAIL PROTECTED] wrote:

On Mon, Oct 27, 2008 at 3:50 AM, Nick Coghlan <[EMAIL PROTECTED]> wrote:

For what it's worth, Twisted uses the __path__ attribute to facilitate its
plugin mechanism.

But how do you manipulate it for frozen packages currently? Importing
a frozen package currently has a bad __path__ value::

 >>> import __phello__; __phello__.__path__
 '__phello__'

Notice how that is not a list. Do you special-case frozen packages?

Oh. Well, in that case, it's already broken, nevermind :). I naively assumed that someone would have reported a bug in Twisted if it were different from i.e. zip importing. I suppose it makes sense - plugins are used for "twistd" subcommands, and it's unlikely that you'd want to freeze "twistd"; few applications use Twisted plugins themselves yet.

I misunderstood your earlier description; I thought that this (the invalid __path__) was the desired change, not the current state of the world.

(Of course if you could *change* frozen packages to have a valid __path__ I'd appreciate that...)
_______________________________________________
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

Reply via email to