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

Skip to content

Commit cf75754

Browse files
committed
Removed obsolete \kwindex{} calls.
Added "module search path" to the index. "Unix" ==> "\UNIX{}"
1 parent 0d8fcb2 commit cf75754

2 files changed

Lines changed: 26 additions & 30 deletions

File tree

Doc/lib/libsite.tex

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,17 @@ \section{Standard Module \sectcode{site}}
1010
longer necessary.
1111

1212
This will append site-specific paths to to the module search path.
13+
\indexiii{module}{search}{path}
1314

1415
It starts by constructing up to four directories from a head and a
1516
tail part. For the head part, it uses \code{sys.prefix} and
1617
\code{sys.exec_prefix}; empty heads are skipped. For
1718
the tail part, it uses the empty string (on Mac or Windows) or it uses
1819
first \file{lib/python\var{version}/site-packages} and then
19-
\file{lib/site-python} (on Unix). For each of the distinct head-tail
20-
combinations, it sees if it refers to an existing directory, and if
21-
so, adds to \code{sys.path}, and also inspected for path configuration
22-
files.
20+
\file{lib/site-python} (on \UNIX{}). For each of the distinct
21+
head-tail combinations, it sees if it refers to an existing directory,
22+
and if so, adds to \code{sys.path}, and also inspected for path
23+
configuration files.
2324
\indexii{site-python}{directory}
2425
\indexii{site-packages}{directory}
2526

@@ -32,10 +33,6 @@ \section{Standard Module \sectcode{site}}
3233
\code{\#} are skipped.
3334
\index{package}
3435
\indexiii{path}{configuration}{file}
35-
\kwindex{sys.prefix}
36-
\kwindex{sys.exec_prefix}
37-
\kwindex{prefix}
38-
\kwindex{exec_prefix}
3936

4037
For example, suppose \code{sys.prefix} and \code{sys.exec_prefix} are
4138
set to \file{/usr/local}. The Python 1.5 library is then installed in
@@ -61,7 +58,8 @@ \section{Standard Module \sectcode{site}}
6158
bar
6259
\end{verbatim}\ecode
6360

64-
Then the following directories are added to sys.path, in this order:
61+
Then the following directories are added to \code{sys.path}, in this
62+
order:
6563

6664
\bcode\begin{verbatim}
6765
/usr/local/python1.5/site-packages/bar
@@ -75,11 +73,11 @@ \section{Standard Module \sectcode{site}}
7573
configuration file.
7674

7775
After these path manipulations, an attempt is made to import a module
78-
named \code{sitecustomize}, which can perform arbitrary site-specific
79-
customizations. If this import fails with an \code{ImportError}
80-
exception, it is silently ignored.
81-
\refmodindex{sitecustomize}
76+
named \code{sitecustomize}\refmodindex{sitecustomize}, which can
77+
perform arbitrary site-specific customizations. If this import fails
78+
with an \code{ImportError} exception, it is silently ignored.
8279

83-
Note that for some non-Unix systems, \code{sys.prefix} and
80+
Note that for some non-\UNIX{} systems, \code{sys.prefix} and
8481
\code{sys.exec_prefix} are empty, and the path manipulations are
85-
skipped; however the import of \code{sitecustomize} is still attempted.
82+
skipped; however the import of
83+
\code{sitecustomize}\refmodindex{sitecustomize} is still attempted.

Doc/libsite.tex

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,17 @@ \section{Standard Module \sectcode{site}}
1010
longer necessary.
1111

1212
This will append site-specific paths to to the module search path.
13+
\indexiii{module}{search}{path}
1314

1415
It starts by constructing up to four directories from a head and a
1516
tail part. For the head part, it uses \code{sys.prefix} and
1617
\code{sys.exec_prefix}; empty heads are skipped. For
1718
the tail part, it uses the empty string (on Mac or Windows) or it uses
1819
first \file{lib/python\var{version}/site-packages} and then
19-
\file{lib/site-python} (on Unix). For each of the distinct head-tail
20-
combinations, it sees if it refers to an existing directory, and if
21-
so, adds to \code{sys.path}, and also inspected for path configuration
22-
files.
20+
\file{lib/site-python} (on \UNIX{}). For each of the distinct
21+
head-tail combinations, it sees if it refers to an existing directory,
22+
and if so, adds to \code{sys.path}, and also inspected for path
23+
configuration files.
2324
\indexii{site-python}{directory}
2425
\indexii{site-packages}{directory}
2526

@@ -32,10 +33,6 @@ \section{Standard Module \sectcode{site}}
3233
\code{\#} are skipped.
3334
\index{package}
3435
\indexiii{path}{configuration}{file}
35-
\kwindex{sys.prefix}
36-
\kwindex{sys.exec_prefix}
37-
\kwindex{prefix}
38-
\kwindex{exec_prefix}
3936

4037
For example, suppose \code{sys.prefix} and \code{sys.exec_prefix} are
4138
set to \file{/usr/local}. The Python 1.5 library is then installed in
@@ -61,7 +58,8 @@ \section{Standard Module \sectcode{site}}
6158
bar
6259
\end{verbatim}\ecode
6360

64-
Then the following directories are added to sys.path, in this order:
61+
Then the following directories are added to \code{sys.path}, in this
62+
order:
6563

6664
\bcode\begin{verbatim}
6765
/usr/local/python1.5/site-packages/bar
@@ -75,11 +73,11 @@ \section{Standard Module \sectcode{site}}
7573
configuration file.
7674

7775
After these path manipulations, an attempt is made to import a module
78-
named \code{sitecustomize}, which can perform arbitrary site-specific
79-
customizations. If this import fails with an \code{ImportError}
80-
exception, it is silently ignored.
81-
\refmodindex{sitecustomize}
76+
named \code{sitecustomize}\refmodindex{sitecustomize}, which can
77+
perform arbitrary site-specific customizations. If this import fails
78+
with an \code{ImportError} exception, it is silently ignored.
8279

83-
Note that for some non-Unix systems, \code{sys.prefix} and
80+
Note that for some non-\UNIX{} systems, \code{sys.prefix} and
8481
\code{sys.exec_prefix} are empty, and the path manipulations are
85-
skipped; however the import of \code{sitecustomize} is still attempted.
82+
skipped; however the import of
83+
\code{sitecustomize}\refmodindex{sitecustomize} is still attempted.

0 commit comments

Comments
 (0)