Skip to content

Commit 4cf7bb8

Browse files
authored
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.
1 parent 2f9ef51 commit 4cf7bb8

File tree

2 files changed

+37
-36
lines changed

2 files changed

+37
-36
lines changed

Doc/library/idle.rst

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -726,28 +726,29 @@ with objects that get input from and send output to the Shell window.
726726
The original values stored in ``sys.__stdin__``, ``sys.__stdout__``, and
727727
``sys.__stderr__`` are not touched, but may be ``None``.
728728

729-
When Shell has the focus, it controls the keyboard and screen. This is
730-
normally transparent, but functions that directly access the keyboard
731-
and screen will not work. These include system-specific functions that
732-
determine whether a key has been pressed and if so, which.
733-
734729
IDLE's standard stream replacements are not inherited by subprocesses
735-
created in the execution process, whether directly by user code or by modules
736-
such as multiprocessing. If such subprocess use ``input`` from sys.stdin
737-
or ``print`` or ``write`` to sys.stdout or sys.stderr,
730+
created in the execution process, whether directly by user code or by
731+
modules such as multiprocessing. If such subprocess use ``input`` from
732+
sys.stdin or ``print`` or ``write`` to sys.stdout or sys.stderr,
738733
IDLE should be started in a command line window. The secondary subprocess
739734
will then be attached to that window for input and output.
740735

741-
The IDLE code running in the execution process adds frames to the call stack
742-
that would not be there otherwise. IDLE wraps ``sys.getrecursionlimit`` and
743-
``sys.setrecursionlimit`` to reduce the effect of the additional stack frames.
744-
745736
If ``sys`` is reset by user code, such as with ``importlib.reload(sys)``,
746737
IDLE's changes are lost and input from the keyboard and output to the screen
747738
will not work correctly.
748739

749-
When user code raises SystemExit either directly or by calling sys.exit, IDLE
750-
returns to a Shell prompt instead of exiting.
740+
When Shell has the focus, it controls the keyboard and screen. This is
741+
normally transparent, but functions that directly access the keyboard
742+
and screen will not work. These include system-specific functions that
743+
determine whether a key has been pressed and if so, which.
744+
745+
The IDLE code running in the execution process adds frames to the call stack
746+
that would not be there otherwise. IDLE wraps ``sys.getrecursionlimit`` and
747+
``sys.setrecursionlimit`` to reduce the effect of the additional stack
748+
frames.
749+
750+
When user code raises SystemExit either directly or by calling sys.exit,
751+
IDLE returns to a Shell prompt instead of exiting.
751752

752753
User output in Shell
753754
^^^^^^^^^^^^^^^^^^^^

Lib/idlelib/help.html

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<head>
66
<meta charset="utf-8" />
77
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
8-
<title>IDLE &#8212; Python 3.10.0a1 documentation</title>
8+
<title>IDLE &#8212; Python 3.10.0a5 documentation</title>
99
<link rel="stylesheet" href="../_static/pydoctheme.css" type="text/css" />
1010
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
1111

@@ -18,7 +18,7 @@
1818
<script src="../_static/sidebar.js"></script>
1919

2020
<link rel="search" type="application/opensearchdescription+xml"
21-
title="Search within Python 3.10.0a1 documentation"
21+
title="Search within Python 3.10.0a5 documentation"
2222
href="../_static/opensearch.xml"/>
2323
<link rel="author" title="About these documents" href="../about.html" />
2424
<link rel="index" title="Index" href="../genindex.html" />
@@ -32,7 +32,6 @@
3232

3333

3434

35-
3635
<style>
3736
@media only screen {
3837
table.full-width-table {
@@ -71,8 +70,8 @@ <h3>Navigation</h3>
7170
<li><a href="https://www.python.org/">Python</a> &#187;</li>
7271

7372

74-
<li>
75-
<a href="../index.html">3.10.0a1 Documentation</a> &#187;
73+
<li id="cpython-language-and-version">
74+
<a href="../index.html">3.10.0a5 Documentation</a> &#187;
7675
</li>
7776

7877
<li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &#187;</li>
@@ -285,7 +284,7 @@ <h3>Shell menu (Shell window only)<a class="headerlink" href="#shell-menu-shell-
285284
<dl class="simple">
286285
<dt>View Last Restart</dt><dd><p>Scroll the shell window to the last Shell restart.</p>
287286
</dd>
288-
<dt>Restart Shell</dt><dd><p>Restart the shell to clean the environment.</p>
287+
<dt>Restart Shell</dt><dd><p>Restart the shell to clean the environment and reset display and exception handling.</p>
289288
</dd>
290289
<dt>Previous History</dt><dd><p>Cycle through earlier commands in history which match the current entry.</p>
291290
</dd>
@@ -680,24 +679,25 @@ <h3>Running user code<a class="headerlink" href="#running-user-code" title="Perm
680679
with objects that get input from and send output to the Shell window.
681680
The original values stored in <code class="docutils literal notranslate"><span class="pre">sys.__stdin__</span></code>, <code class="docutils literal notranslate"><span class="pre">sys.__stdout__</span></code>, and
682681
<code class="docutils literal notranslate"><span class="pre">sys.__stderr__</span></code> are not touched, but may be <code class="docutils literal notranslate"><span class="pre">None</span></code>.</p>
683-
<p>When Shell has the focus, it controls the keyboard and screen. This is
684-
normally transparent, but functions that directly access the keyboard
685-
and screen will not work. These include system-specific functions that
686-
determine whether a key has been pressed and if so, which.</p>
687682
<p>IDLE’s standard stream replacements are not inherited by subprocesses
688-
created in the execution process, whether directly by user code or by modules
689-
such as multiprocessing. If such subprocess use <code class="docutils literal notranslate"><span class="pre">input</span></code> from sys.stdin
690-
or <code class="docutils literal notranslate"><span class="pre">print</span></code> or <code class="docutils literal notranslate"><span class="pre">write</span></code> to sys.stdout or sys.stderr,
683+
created in the execution process, whether directly by user code or by
684+
modules such as multiprocessing. If such subprocess use <code class="docutils literal notranslate"><span class="pre">input</span></code> from
685+
sys.stdin or <code class="docutils literal notranslate"><span class="pre">print</span></code> or <code class="docutils literal notranslate"><span class="pre">write</span></code> to sys.stdout or sys.stderr,
691686
IDLE should be started in a command line window. The secondary subprocess
692687
will then be attached to that window for input and output.</p>
693-
<p>The IDLE code running in the execution process adds frames to the call stack
694-
that would not be there otherwise. IDLE wraps <code class="docutils literal notranslate"><span class="pre">sys.getrecursionlimit</span></code> and
695-
<code class="docutils literal notranslate"><span class="pre">sys.setrecursionlimit</span></code> to reduce the effect of the additional stack frames.</p>
696688
<p>If <code class="docutils literal notranslate"><span class="pre">sys</span></code> is reset by user code, such as with <code class="docutils literal notranslate"><span class="pre">importlib.reload(sys)</span></code>,
697689
IDLE’s changes are lost and input from the keyboard and output to the screen
698690
will not work correctly.</p>
699-
<p>When user code raises SystemExit either directly or by calling sys.exit, IDLE
700-
returns to a Shell prompt instead of exiting.</p>
691+
<p>When Shell has the focus, it controls the keyboard and screen. This is
692+
normally transparent, but functions that directly access the keyboard
693+
and screen will not work. These include system-specific functions that
694+
determine whether a key has been pressed and if so, which.</p>
695+
<p>The IDLE code running in the execution process adds frames to the call stack
696+
that would not be there otherwise. IDLE wraps <code class="docutils literal notranslate"><span class="pre">sys.getrecursionlimit</span></code> and
697+
<code class="docutils literal notranslate"><span class="pre">sys.setrecursionlimit</span></code> to reduce the effect of the additional stack
698+
frames.</p>
699+
<p>When user code raises SystemExit either directly or by calling sys.exit,
700+
IDLE returns to a Shell prompt instead of exiting.</p>
701701
</div>
702702
<div class="section" id="user-output-in-shell">
703703
<h3>User output in Shell<a class="headerlink" href="#user-output-in-shell" title="Permalink to this headline"></a></h3>
@@ -949,8 +949,8 @@ <h3>Navigation</h3>
949949
<li><a href="https://www.python.org/">Python</a> &#187;</li>
950950

951951

952-
<li>
953-
<a href="../index.html">3.10.0a1 Documentation</a> &#187;
952+
<li id="cpython-language-and-version">
953+
<a href="../index.html">3.10.0a5 Documentation</a> &#187;
954954
</li>
955955

956956
<li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &#187;</li>
@@ -974,15 +974,15 @@ <h3>Navigation</h3>
974974
</ul>
975975
</div>
976976
<div class="footer">
977-
&copy; <a href="../copyright.html">Copyright</a> 2001-2020, Python Software Foundation.
977+
&copy; <a href="../copyright.html">Copyright</a> 2001-2021, Python Software Foundation.
978978
<br />
979979

980980
The Python Software Foundation is a non-profit corporation.
981981
<a href="https://www.python.org/psf/donations/">Please donate.</a>
982982
<br />
983983
<br />
984984

985-
Last updated on Oct 20, 2020.
985+
Last updated on Feb 21, 2021.
986986
<a href="https://docs.python.org/3/bugs.html">Found a bug</a>?
987987
<br />
988988

0 commit comments

Comments
 (0)