[Python-Dev] Re: Path hacking

M.-A. Lemburg mal@lemburg.com
Wed, 15 Sep 1999 19:02:20 +0200


Guido van Rossum wrote:
> > It seems to me this totally solves Jim Fulton's and Marc's
> > problem and makes "__" unnecessary.  You just install zope
> > and mx in zopedir, perform the above, and presto you have a new
> > private name space where you can control all your names.  But
> > there must be some problem here I haven't thought of.
> 
> I think no simple solution that *I* can come up with will satisfy
> JimF's and Marc's desire for obscurity :-)

Never mind, I'll use an imputil.py based approach to get relative
imports to work in my packages. That is when I get imputil.py
to work... it doesn't seem to be quite there yet (or I'm using
an old version).

BTW, I'm 100% behind you guys if you choose to reimplement Python's
import mechanism in Python using a similar approach as the one
Greg implemented in imputil. Should make everybody happy: those
who want obscure syntactic add-ons and others with a taste for
zlib'ed packaged byte code, plus those VMS freaks ;-)

Perhaps we should start a new thread on that topic... 

Still needed are:

 Python level APIs for the platform specific magic on
  Win32 and Macs (OS/2, BeOS ?), e.g. access to the Windows
  registry and the Mac forks

 Patches to make the DirectoryImporter 100% backward compatible

Greg's imputil.py can be found at:

	http://www.lyra.org/greg/small/

The trick would then be to install an application specific
importer in the setup module Spam_path or MyAppSetup which
then takes care of all the rest... 

-- 
Marc-Andre Lemburg
______________________________________________________________________
Y2000:                                                   107 days left
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/