From: Melanie Arbor Date: Mon, 20 May 2024 23:38:33 +0000 (-0400) Subject: gh-102136: Add -m to options that work with -i (GH-119271) X-Git-Tag: v3.14.0a1~1844 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=172690227e771c2e8ab137815073e3a172c08dec;p=thirdparty%2FPython%2Fcpython.git gh-102136: Add -m to options that work with -i (GH-119271) * GH-102136: Add -m to options that work with -i * Linting --- diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst index 2d95fa947403..dcca9060899a 100644 --- a/Doc/using/cmdline.rst +++ b/Doc/using/cmdline.rst @@ -290,9 +290,15 @@ Miscellaneous options .. option:: -i - When a script is passed as first argument or the :option:`-c` option is used, - enter interactive mode after executing the script or the command, even when - :data:`sys.stdin` does not appear to be a terminal. The + Enter interactive mode after execution. + + Using the :option:`-i` option will enter interactive mode in any of the following circumstances\: + + * When a script is passed as first argument + * When the :option:`-c` option is used + * When the :option:`-m` option is used + + Interactive mode will start even when :data:`sys.stdin` does not appear to be a terminal. The :envvar:`PYTHONSTARTUP` file is not read. This can be useful to inspect global variables or a stack trace when a script