[Python-Dev] Landmark

Gordon McMillan gmcm@hypernet.com
Fri, 12 May 2000 15:50:56 -0400


[MAL]
> > Since string.py is being depreciated, I think we should
> > consider a new landmark (such as os.py) or maybe even a
> > whole new strategy for finding the standard lib location.
[GvR]
> I don't see a need for a new strategy

I'll argue for (a choice of) new strategy. The getpath & friends 
code spends a whole lot of time and energy trying to reverse 
engineer things like developer builds and strange sys-admin 
pranks. I agree that code shouldn't die. But it creates painful 
startup times when Python is being used for something like 
CGI.

How about something on the command line that says (pick 
one or come up with another choice):
 - PYTHONPATH is *it*
 - use PYTHONPATH and .pth files found <here>
 - start in <sys.prefix>/lib/python<sys.version[:3]> and add 
PYTHONPATH
 - there's a .pth file <here> with the whole list
 - pretty much any permutation of the above elements

The idea being to avoid a few hundred system calls when a 
dozen or so will suffice. Default behavior should still be to 
magically get it right.


- Gordon