[Python-Dev] Re: .DLL vs .PYD search order
Guido van Rossum
guido@CNRI.Reston.VA.US
Thu, 02 Dec 1999 06:59:34 -0500
> On the Mac I've introduced "magic cookies" into sys.path, which
> allow you to do interesting searches (like searching for a DLL or
> PYC-resource in the application itself) at known places in the
> import process.
> There isn't a cookie for "search along the standard MacOS dll search
> path" (which is somewhat similar to the Windows dll search path)
> because I haven't seen a reason for it, but there's nothing to stop
> it. And if you'd insert that cookie it would be perfectly clear (at
> least, it should be) that only dll modules will be found in that
> step, not .py modules.
> Actually I'm so happy with the magic cookie scheme that I've
> advocated at various times in the past that something similar also
> be used for determining where builtin modules and frozen modules
> appear in sys.path...
I see the magic cookies as a poor man's (but more compatible!) version
of a chain of importers as advocated by Greg Stein and other imputil
fans. I like the idea, except that I think that the chain should be
manipulatable more easily than the current imputil implementation.
(I'll have more comments on Greg's comments later, when I've actually
read them through.)
--Guido van Rossum (home page: http://www.python.org/~guido/)