Add note about site module (site-packages)

This commit is contained in:
Peter Bittner 2019-10-28 23:37:53 +01:00
parent ae7aa42774
commit 6e8d4b2bb2
1 changed files with 6 additions and 0 deletions

View File

@ -198,6 +198,12 @@ named :file:`spam.py` in a list of directories given by the variable
script is calculated after the symlink is followed. In other words the
directory containing the symlink is **not** added to the module search path.
.. note::
The :mod:`site` module is responsible for appending site-specific paths to
the module search path. It also provides a way to get a list of all
site-specific paths, which can be global and per user site-packages
directories (:pep:`370`), from the command line via ``python -m site``.
After initialization, Python programs can modify :data:`sys.path`. The
directory containing the script being run is placed at the beginning of the
search path, ahead of the standard library path. This means that scripts in that