Issue #16400: Add command line option for isolated mode.

-I

    Run Python in isolated mode. This also implies -E and -s. In isolated mode
    sys.path contains neither the script’s directory nor the user’s
    site-packages directory. All PYTHON* environment variables are ignored,
    too. Further restrictions may be imposed to prevent the user from
    injecting malicious code.
This commit is contained in:
Christian Heimes 2013-08-10 16:36:18 +02:00
parent 562d9cbfe9
commit ad73a9cf97
11 changed files with 77 additions and 10 deletions

View file

@ -329,7 +329,11 @@ Process-wide parameters
.. c:function:: void PySys_SetArgv(int argc, wchar_t **argv)
This function works like :c:func:`PySys_SetArgvEx` with *updatepath* set to 1.
This function works like :c:func:`PySys_SetArgvEx` with *updatepath* set
to 1 unless the :program:`python` interpreter was started with the
:option:`-I`.
.. versionchanged:: 3.4 The *updatepath* value depends on :option:`-I`.
.. c:function:: void Py_SetPythonHome(wchar_t *home)