summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-02-21 08:04:11 (GMT)
committerGitHub <noreply@github.com>2021-02-21 08:04:11 (GMT)
commit6ddb25586524022923d076ddb3b5867214c6ce42 (patch)
tree8c8709af6104e7b8899041cf090426c2995606a2 /Doc/library
parent089a21f7429a3fd3cf78e3779df724757d346d19 (diff)
downloadcpython-6ddb25586524022923d076ddb3b5867214c6ce42.zip
cpython-6ddb25586524022923d076ddb3b5867214c6ce42.tar.gz
cpython-6ddb25586524022923d076ddb3b5867214c6ce42.tar.bz2
bpo-43283: Rearrange some IDLE doc paragraphs. (GH-24604)
In the Running User Code section, gather together paragraphs about two processes and the sys.stdstream replacements, preparing to add another. (cherry picked from commit 4cf7bb8e22bf37e6d65bf4cb5618d09c4a8ad612) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/idle.rst29
1 files changed, 15 insertions, 14 deletions
diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst
index e7eaabd..fc45e31 100644
--- a/Doc/library/idle.rst
+++ b/Doc/library/idle.rst
@@ -726,28 +726,29 @@ with objects that get input from and send output to the Shell window.
The original values stored in ``sys.__stdin__``, ``sys.__stdout__``, and
``sys.__stderr__`` are not touched, but may be ``None``.
-When Shell has the focus, it controls the keyboard and screen. This is
-normally transparent, but functions that directly access the keyboard
-and screen will not work. These include system-specific functions that
-determine whether a key has been pressed and if so, which.
-
IDLE's standard stream replacements are not inherited by subprocesses
-created in the execution process, whether directly by user code or by modules
-such as multiprocessing. If such subprocess use ``input`` from sys.stdin
-or ``print`` or ``write`` to sys.stdout or sys.stderr,
+created in the execution process, whether directly by user code or by
+modules such as multiprocessing. If such subprocess use ``input`` from
+sys.stdin or ``print`` or ``write`` to sys.stdout or sys.stderr,
IDLE should be started in a command line window. The secondary subprocess
will then be attached to that window for input and output.
-The IDLE code running in the execution process adds frames to the call stack
-that would not be there otherwise. IDLE wraps ``sys.getrecursionlimit`` and
-``sys.setrecursionlimit`` to reduce the effect of the additional stack frames.
-
If ``sys`` is reset by user code, such as with ``importlib.reload(sys)``,
IDLE's changes are lost and input from the keyboard and output to the screen
will not work correctly.
-When user code raises SystemExit either directly or by calling sys.exit, IDLE
-returns to a Shell prompt instead of exiting.
+When Shell has the focus, it controls the keyboard and screen. This is
+normally transparent, but functions that directly access the keyboard
+and screen will not work. These include system-specific functions that
+determine whether a key has been pressed and if so, which.
+
+The IDLE code running in the execution process adds frames to the call stack
+that would not be there otherwise. IDLE wraps ``sys.getrecursionlimit`` and
+``sys.setrecursionlimit`` to reduce the effect of the additional stack
+frames.
+
+When user code raises SystemExit either directly or by calling sys.exit,
+IDLE returns to a Shell prompt instead of exiting.
User output in Shell
^^^^^^^^^^^^^^^^^^^^