From: <bc...@wo...> - 2000-12-06 08:58:52
|
[Robert W. Bill] >I just added a FAQ entry and had second thoughts about it's >accuracy... It's accurate. >The registry key python.path appends the value *before* it appends >sys.prefix/lib. While appending to sys.path in autoloaded site.py happens >*after* sys.prefix/lib. > >Q1- This is intended behavior? (I assumed so, just checking because there >isn't an obvious counterpart in CPython. Both *.pth and site.py append >after sys.prefix/lib.) It's how it works right now. I wouldn't mind changing it so python.path as appended after sys.prefix/Lib. For my own development version of python.path I also need the CPython libs after sys.prefix/lib, so I had to add: python.path = .;i:\\java\\jython.CVS\\lib;d:\\python20\\lib There is too much room for errors with this. >Q2- Is the python.path key obsolete in the registry? The lib does come >with Jython, and site.py is autoloaded- what more could people want? python.path is still needed. I want a useful sys.path even when running with the -S option (skip site import). I also want the ability to have a replacement for sys.prefix/Lib inserted before the standard Lib. My suggestion: python.path is appended to sys.path after sys.prefix/Lib. Adding library directories (including CPython's Lib) is usually done with python.path. A new python.prepath option gets inserted before sys.prefix/Lib. Only for use in very special cases. >Note: a search:replace with JPython:Jython on the registry file would be >good- attached in case it saves any work (from 20001205 nightly CVS). Thanks. regards, finn |