Jim's latest update
This commit is contained in:
parent
d79162f032
commit
4574958961
19
pep-0273.txt
19
pep-0273.txt
|
@ -134,16 +134,15 @@ Booting
|
|||
find its corresponding libraries even when there are multiple
|
||||
Python versions on the same machine.
|
||||
|
||||
This PEP suggests a zip archive name equal to the Python
|
||||
interpreter path with extension ".zip" (eg, /usr/bin/python.zip)
|
||||
which is always prepended to sys.path. So a directory with python
|
||||
and python.zip is complete. This would work fine on Windows, as
|
||||
it is common to put supporting files in the directory of the
|
||||
executable. But it may offend Unix fans, who dislike bin
|
||||
directories being used for libraries. It might be fine to
|
||||
generate different defaults for Windows and Unix if necessary, but
|
||||
the code will be in C, and there is no sense getting complicated.
|
||||
|
||||
I propose that there is one name added to sys.path, and the
|
||||
file name is "python%s%s.zip" % (sys.version[0], sys.version[2]).
|
||||
For example, python22.zip. This is the same on all platforms.
|
||||
On Unix, the directory is sys.prefix + "/lib". So for prefix
|
||||
/usr/local, the path /usr/local/lib/python2.2/ is already on
|
||||
sys.path, and /usr/local/lib/python22.zip would be added.
|
||||
On Windows, the directory is the directory of sys.executable.
|
||||
The zip archive name is always inserted as the second item
|
||||
in sys.path. The first always seems to be ''.
|
||||
|
||||
Implementation
|
||||
|
||||
|
|
Loading…
Reference in New Issue