From b43ae9bcf8ac6b4760be19f4a20b7d85d9ba7a08 Mon Sep 17 00:00:00 2001 From: Melanie Arbor Date: Mon, 20 May 2024 19:38:33 -0400 Subject: [PATCH] gh-102136: Add -m to options that work with -i (GH-119271) * GH-102136: Add -m to options that work with -i * Linting (cherry picked from commit 172690227e771c2e8ab137815073e3a172c08dec) Co-authored-by: Melanie Arbor --- Doc/using/cmdline.rst | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst index 82fbc82b5da8af..bde06a0c4f2943 100644 --- a/Doc/using/cmdline.rst +++ b/Doc/using/cmdline.rst @@ -289,9 +289,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