Mercurial > cpython-lru_cache-weakref
comparison Python/pythonrun.c @ 85081:dd0d751cc7f1
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.
| author | Christian Heimes <christian@cheimes.de> |
|---|---|
| date | Sat, 10 Aug 2013 16:36:18 +0200 |
| parents | 31664b304281 |
| children | becbb65074e1 |
comparison
equal
deleted
inserted
replaced
| 85080:d43435e82e21 | 85081:dd0d751cc7f1 |
|---|---|
| 110 int Py_FrozenFlag; /* Needed by getpath.c */ | 110 int Py_FrozenFlag; /* Needed by getpath.c */ |
| 111 int Py_IgnoreEnvironmentFlag; /* e.g. PYTHONPATH, PYTHONHOME */ | 111 int Py_IgnoreEnvironmentFlag; /* e.g. PYTHONPATH, PYTHONHOME */ |
| 112 int Py_NoUserSiteDirectory = 0; /* for -s and site.py */ | 112 int Py_NoUserSiteDirectory = 0; /* for -s and site.py */ |
| 113 int Py_UnbufferedStdioFlag = 0; /* Unbuffered binary std{in,out,err} */ | 113 int Py_UnbufferedStdioFlag = 0; /* Unbuffered binary std{in,out,err} */ |
| 114 int Py_HashRandomizationFlag = 0; /* for -R and PYTHONHASHSEED */ | 114 int Py_HashRandomizationFlag = 0; /* for -R and PYTHONHASHSEED */ |
| 115 int Py_IsolatedFlag = 0; /* for -I, isolate from user's env */ | |
| 115 | 116 |
| 116 PyThreadState *_Py_Finalizing = NULL; | 117 PyThreadState *_Py_Finalizing = NULL; |
| 117 | 118 |
| 118 /* PyModule_GetWarningsModule is no longer necessary as of 2.6 | 119 /* PyModule_GetWarningsModule is no longer necessary as of 2.6 |
| 119 since _warnings is builtin. This API should not be used. */ | 120 since _warnings is builtin. This API should not be used. */ |
