diff options
author | Éric Araujo <merwok@netwok.org> | 2011-03-23 04:53:10 +0100 |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2011-03-23 04:53:10 +0100 |
commit | e84c4df786e9238ed80ff0435ffa053ef227a57a (patch) | |
tree | 48fd4626ff1e64229262d97e30f36068af42be8b /Lib/site.py | |
parent | 83e7a2b7db047d70d29800a0f8d5c5beab5c936d (diff) | |
parent | 97054cf0b5b5a41ba07474e247057b808236845b (diff) | |
download | cpython-git-e84c4df786e9238ed80ff0435ffa053ef227a57a.tar.gz |
Branch merge
Diffstat (limited to 'Lib/site.py')
-rw-r--r-- | Lib/site.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Lib/site.py b/Lib/site.py index a2c0becbc1..fcfdbedf26 100644 --- a/Lib/site.py +++ b/Lib/site.py @@ -508,6 +508,11 @@ def execusercustomize(): def main(): + """Add standard site-specific directories to the module search path. + + This function is called automatically when this module is imported, + unless the python interpreter was started with the -S flag. + """ global ENABLE_USER_SITE abs_paths() @@ -526,7 +531,10 @@ def main(): if ENABLE_USER_SITE: execusercustomize() -main() +# Prevent edition of sys.path when python was started with -S and +# site is imported later. +if not sys.flags.no_site: + main() def _script(): help = """\ |