sys.prefix gives the site-specific directory
prefix where the platform independent Python files are installed; by
default, this is the string "/usr/local". This can be set at
build time with the -prefix argument to the configure
script. The main collection of Python library modules is installed in
the directory sys.prefix+"/lib/python1.4" while the platform
independent header files (all except config.h) are stored in
sys.prefix+"/include/python1.4".
Similarly, the variable sys.exec_prefix gives the site-specific
directory prefix where the platform dependent Python files are
installed; by default, this is also "/usr/local". This can be
set at build time with the -exec-prefix argument to the
configure script. Specifically, all configuration files
(e.g. the config.h header file) are installed in the directory
sys.exec_prefix+"/lib/python1.4/config", and shared library
modules are installed in
sys.exec_prefix+"/lib/python1.4/sharedmodules".
Include files are at sys.prefix+"/include/python1.4".
It is not yet decided what the most portable way is to come up with the version number used in these pathnames. For compatibility with the 1.4beta releases, sys.version[:3] can be used.
On non-Unix systems, these variables are meaningless.
site, when imported, appends two site-specific
directories to the end of sys.path:
$prefix/lib/site-python and
$exec_prefix/lib/site-python, where $prefix and
$exec_prefix are the directories sys.prefix and
sys.exec_prefix mentioned above.
After this path manipulation has been performed, an attempt is made to
import the module sitecustomize. Any ImportError
exception raised by this attempt is silently ignored.