GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing docs.python.org — 3.23 site -- Site-specific configuration hook 3.23 site -- Site-specific configuration hook
This module is automatically imported during initialization. In earlier versions of Python (up to and including 1.5a3), scripts or modules that needed to use site-specific modules would place "import site" somewhere near the top of their code. This is no longer necessary. This will append site-specific paths to the module search path.
It starts by constructing up to four directories from a head and a
tail part. For the head part, it uses
A path configuration file is a file whose name has the form
package.pth; its contents are additional items (one
per line) to be added to
For example, suppose
and bar.pth contains:
Then the following directories are added to
Note that bletch is omitted because it doesn't exist; the bar directory precedes the foo directory because bar.pth comes alphabetically before foo.pth; and spam is omitted because it is not mentioned in either path configuration file. After these path manipulations, an attempt is made to import a module named sitecustomize, which can perform arbitrary site-specific customizations. If this import fails with an ImportError exception, it is silently ignored.
Note that for some non-Unix systems, See About this document... for information on suggesting changes. |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |