Lines Matching +full:- +full:- +full:site
1 :mod:`site` --- Site-specific configuration hook
4 .. module:: site
5 :synopsis: Module responsible for site-specific configuration.
7 **Source code:** :source:`Lib/site.py`
9 --------------
14 import can be suppressed using the interpreter's :option:`-S` option.
18 Importing this module will append site-specific paths to the module search path
19 and add a few builtins, unless :option:`-S` was used. In that case, this module
21 or additions to the builtins. To explicitly trigger the usual site-specific
22 additions, call the :func:`site.main` function.
26 :option:`-S`.
29 pair: site-packages; directory
34 :file:`lib/site-packages` (on Windows) or
35 :file:`lib/python{X.Y}/site-packages` (on Unix and macOS). For each
36 of the distinct head-tail combinations, it sees if it refers to an existing
41 Support for the "site-python" directory has been removed.
45 it is also checked for site-packages (sys.base_prefix and
48 the key "include-system-site-packages" set to anything other than "true"
49 (case-insensitive), the system-level prefixes will not be
50 searched for site-packages; otherwise they will.
58 additional items (one per line) to be added to ``sys.path``. Non-existing items
71 (load 3rd-party import hooks, adjust :envvar:`PATH` etc).
84 a subdirectory :file:`/usr/local/lib/python{X.Y}/site-packages` with three
101 Then the following version-specific directories are added to
104 /usr/local/lib/pythonX.Y/site-packages/bar
105 /usr/local/lib/pythonX.Y/site-packages/foo
115 :mod:`sitecustomize`, which can perform arbitrary site-specific customizations.
116 It is typically created by a system administrator in the site-packages
127 which can perform arbitrary user-specific customizations, if
129 user site-packages directory (see below), which is part of ``sys.path`` unless
130 disabled by :option:`-s`. If this import fails with an :exc:`ImportError` or
134 Note that for some non-Unix systems, ``sys.prefix`` and ``sys.exec_prefix`` are
139 .. _rlcompleter-config:
142 ----------------------
146 :ref:`interactive mode <tut-interactive>` and without the :option:`-S` option.
147 The default behavior is enable tab-completion and to use
158 ---------------
162 A list of prefixes for site-packages directories.
167 Flag showing the status of the user site-packages directory. ``True`` means
169 was disabled by user request (with :option:`-s` or
177 Path to the user site-packages for the running Python. Can be ``None`` if
179 :file:`~/.local/lib/python{X.Y}/site-packages` for UNIX and non-framework
180 macOS builds, :file:`~/Library/Python/{X.Y}/lib/python/site-packages` for macOS
181 framework builds, and :file:`{%APPDATA%}\\Python\\Python{XY}\\site-packages`
182 on Windows. This directory is a site directory, which means that
188 Path to the base directory for the user site-packages. Can be ``None`` if
190 :file:`~/.local` for UNIX and macOS non-framework builds,
194 etc. for the :ref:`user installation scheme <inst-alt-install-user>`.
200 Adds all the standard site-specific directories to the module search
202 unless the Python interpreter was started with the :option:`-S` flag.
216 Return a list containing all global site-packages directories.
232 Return the path of the user-specific site-packages directory,
234 it, respecting :data:`USER_BASE`. To determine if the user-specific
235 site-packages was added to ``sys.path`` :data:`ENABLE_USER_SITE` should be
241 .. _site-commandline:
244 ----------------------
246 .. program:: site
248 The :mod:`site` module also provides a way to get the user directories from the
251 .. code-block:: shell-session
253 $ python3 -m site --user-site
254 /home/user/.local/lib/python3.3/site-packages
261 .. cmdoption:: --user-base
265 .. cmdoption:: --user-site
267 Print the path to the user site-packages directory.
269 If both options are given, user base and user site will be printed (always in
273 the user site-packages directory is enabled, ``1`` if it was disabled by the
279 :pep:`370` -- Per user site-packages directory