Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0d8fcb2

Browse files
committed
Update the doc string to emphasize non-Unix behavior earlier;
sys.prefix is no longer empty on any platform that I know of.
1 parent bc5062f commit 0d8fcb2

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

Lib/site.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@
1010
import, this is no longer necessary (but code that does it still
1111
works).
1212
13-
This will append site-specific paths to to the module search path. It
14-
starts with sys.prefix and sys.exec_prefix (if different) and appends
15-
lib/python<version>/site-packages as well as lib/site-python. The
13+
This will append site-specific paths to to the module search path. On
14+
Unix, it starts with sys.prefix and sys.exec_prefix (if different) and
15+
appends lib/python<version>/site-packages as well as lib/site-python.
16+
On other platforms (mainly Mac and Windows), it uses just sys.prefix
17+
(and sys.exec_prefix, if different, but this is unlikely). The
1618
resulting directories, if they exist, are appended to sys.path, and
1719
also inspected for path configuration files.
1820
@@ -53,10 +55,6 @@
5355
site-specific customizations. If this import fails with an
5456
ImportError exception, it is silently ignored.
5557
56-
Note that for some non-Unix systems, sys.prefix and sys.exec_prefix
57-
are empty, and then the path manipulations are skipped; however the
58-
import of sitecustomize is still attempted.
59-
6058
"""
6159

6260
import sys, os

0 commit comments

Comments
 (0)