diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst index dca89eceeda98a..6a60bc4954c625 100644 --- a/Doc/using/cmdline.rst +++ b/Doc/using/cmdline.rst @@ -100,6 +100,11 @@ source. first element will be set to ``"-m"``). As with the :option:`-c` option, the current directory will be added to the start of :data:`sys.path`. + :option:`-I` option can be used to run the script in isolated mode where + :data:`sys.path` contains neither the current directory nor the user's + site-packages directory. All :envvar:`PYTHON*` environment variables are + ignored, too. + Many standard library modules contain code that is invoked on their execution as a script. An example is the :mod:`timeit` module:: @@ -119,6 +124,7 @@ source. .. versionchanged:: 3.4 namespace packages are also supported +.. _cmdarg-dash: .. describe:: - @@ -130,6 +136,8 @@ source. :data:`sys.path`. +.. _cmdarg-script: + .. describe::