This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author carljm
Recipients carljm
Date 2011-03-17.19:46:59
SpamBayes Score 4.3486684e-06
Marked as misclassified No
Message-id <>
If python is run with the -S flag, that declares the intent of the user to not have site-specific additions to sys.path.

However, some code in that process may have a legitimate need for a function defined in - for instance, addsitedir. But the act of importing, as a side effect, adds the standard site-specific directories to sys.path.

python -S would be more useful and reliable if it prevented importing site from automatically making the sys.path additions. There is no loss of flexibility here, as user code could still explicitly call site.main() to achieve all of the current side-effects of "import site".

The fix is a one-liner, and is in the linked hg repository.
Date User Action Args
2011-03-17 19:47:00carljmsetrecipients: + carljm
2011-03-17 19:47:00carljmsetmessageid: <>
2011-03-17 19:47:00carljmlinkissue11591 messages
2011-03-17 19:46:59carljmcreate