diff options
Diffstat (limited to 'Doc/library/site.rst')
-rw-r--r-- | Doc/library/site.rst | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/Doc/library/site.rst b/Doc/library/site.rst index bf65d17..b77f3cf 100644 --- a/Doc/library/site.rst +++ b/Doc/library/site.rst @@ -1,10 +1,12 @@ - :mod:`site` --- Site-specific configuration hook ================================================ .. module:: site :synopsis: A standard way to reference site-specific modules. +**Source code:** :source:`Lib/site.py` + +-------------- **This module is automatically imported during initialization.** The automatic import can be suppressed using the interpreter's :option:`-S` option. @@ -116,6 +118,32 @@ empty, and the path manipulations are skipped; however the import of Adds a directory to sys.path and processes its pth files. +.. function:: getsitepackages() + + Returns a list containing all global site-packages directories + (and possibly site-python). + + .. versionadded:: 3.2 + +.. function:: getuserbase() + + Returns the "user base" directory path. + + The "user base" directory can be used to store data. If the global + variable ``USER_BASE`` is not initialized yet, this function will also set + it. + + .. versionadded:: 3.2 + +.. function:: getusersitepackages() + + Returns the user-specific site-packages directory path. + + If the global variable ``USER_SITE`` is not initialized yet, this + function will also set it. + + .. versionadded:: 3.2 .. XXX Update documentation .. XXX document python -m site --user-base --user-site + |