On 09/06/2005, at 12:29 AM, Nick wrote:
but I just want to be clear that I don't think mod_python should
install any import hooks. That would probably be annoying to seasoned
Python programmers, and really a pain in the butt for me specifically.
Curious to know why you think this would be annoying to seasoned Python
programmers and a pain in the butt to yourself.
Defining import hooks aren't the horrid thing they used to be back in
the
Python 1.5 era. They are flexible enough now that a special import hook
can
be made to only come into play when used in a quite specific context.
Ie.,
you don't have the problem of an import hook having to duplicate exactly
how the standard Python one worked because it isn't taking on the
complete
responsibility of managing everyones imports.
The only real problem is where you use a third party package which
installs
an old style import hook of its own, ie., doesn't follow the newer way
of
doing import hooks, and as a result stuffs everything up. If import
hooks
follow the new way of doing things, multiple import hooks should be
able to
happily coexist.
Graham