From 9ce1b1c396ab6f1c2cc39664487e9d2cd2a4c009 Mon Sep 17 00:00:00 2001 From: Melanie Arbor Date: Mon, 20 May 2024 16:06:30 -0400 Subject: [PATCH 1/2] GH-102136: Add -m to options that work with -i --- 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 2d95fa9474033f..8b2bfe638b4e3c 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 From dbf7807e5ef15d53c8ab9e048f40327536daf24b Mon Sep 17 00:00:00 2001 From: Melanie Arbor Date: Mon, 20 May 2024 16:15:17 -0400 Subject: [PATCH 2/2] Linting --- Doc/using/cmdline.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst index 8b2bfe638b4e3c..dcca9060899a0f 100644 --- a/Doc/using/cmdline.rst +++ b/Doc/using/cmdline.rst @@ -290,15 +290,15 @@ Miscellaneous options .. option:: -i - Enter interactive mode after execution. + 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 + + 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