mirror of
https://github.com/python/cpython.git
synced 2025-09-29 11:45:57 +00:00
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 4cf7bb8e22
)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This commit is contained in:
parent
7cc58890b3
commit
693aeacf88
2 changed files with 37 additions and 36 deletions
|
@ -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
|
The original values stored in ``sys.__stdin__``, ``sys.__stdout__``, and
|
||||||
``sys.__stderr__`` are not touched, but may be ``None``.
|
``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
|
IDLE's standard stream replacements are not inherited by subprocesses
|
||||||
created in the execution process, whether directly by user code or by modules
|
created in the execution process, whether directly by user code or by
|
||||||
such as multiprocessing. If such subprocess use ``input`` from sys.stdin
|
modules such as multiprocessing. If such subprocess use ``input`` from
|
||||||
or ``print`` or ``write`` to sys.stdout or sys.stderr,
|
sys.stdin or ``print`` or ``write`` to sys.stdout or sys.stderr,
|
||||||
IDLE should be started in a command line window. The secondary subprocess
|
IDLE should be started in a command line window. The secondary subprocess
|
||||||
will then be attached to that window for input and output.
|
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)``,
|
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
|
IDLE's changes are lost and input from the keyboard and output to the screen
|
||||||
will not work correctly.
|
will not work correctly.
|
||||||
|
|
||||||
When user code raises SystemExit either directly or by calling sys.exit, IDLE
|
When Shell has the focus, it controls the keyboard and screen. This is
|
||||||
returns to a Shell prompt instead of exiting.
|
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
|
User output in Shell
|
||||||
^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>IDLE — Python 3.10.0a1 documentation</title>
|
<title>IDLE — Python 3.10.0a5 documentation</title>
|
||||||
<link rel="stylesheet" href="../_static/pydoctheme.css" type="text/css" />
|
<link rel="stylesheet" href="../_static/pydoctheme.css" type="text/css" />
|
||||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
<script src="../_static/sidebar.js"></script>
|
<script src="../_static/sidebar.js"></script>
|
||||||
|
|
||||||
<link rel="search" type="application/opensearchdescription+xml"
|
<link rel="search" type="application/opensearchdescription+xml"
|
||||||
title="Search within Python 3.10.0a1 documentation"
|
title="Search within Python 3.10.0a5 documentation"
|
||||||
href="../_static/opensearch.xml"/>
|
href="../_static/opensearch.xml"/>
|
||||||
<link rel="author" title="About these documents" href="../about.html" />
|
<link rel="author" title="About these documents" href="../about.html" />
|
||||||
<link rel="index" title="Index" href="../genindex.html" />
|
<link rel="index" title="Index" href="../genindex.html" />
|
||||||
|
@ -32,7 +32,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@media only screen {
|
@media only screen {
|
||||||
table.full-width-table {
|
table.full-width-table {
|
||||||
|
@ -71,8 +70,8 @@
|
||||||
<li><a href="https://www.python.org/">Python</a> »</li>
|
<li><a href="https://www.python.org/">Python</a> »</li>
|
||||||
|
|
||||||
|
|
||||||
<li>
|
<li id="cpython-language-and-version">
|
||||||
<a href="../index.html">3.10.0a1 Documentation</a> »
|
<a href="../index.html">3.10.0a5 Documentation</a> »
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> »</li>
|
<li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> »</li>
|
||||||
|
@ -285,7 +284,7 @@ Editor window.</p>
|
||||||
<dl class="simple">
|
<dl class="simple">
|
||||||
<dt>View Last Restart</dt><dd><p>Scroll the shell window to the last Shell restart.</p>
|
<dt>View Last Restart</dt><dd><p>Scroll the shell window to the last Shell restart.</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt>Restart Shell</dt><dd><p>Restart the shell to clean the environment.</p>
|
<dt>Restart Shell</dt><dd><p>Restart the shell to clean the environment and reset display and exception handling.</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt>Previous History</dt><dd><p>Cycle through earlier commands in history which match the current entry.</p>
|
<dt>Previous History</dt><dd><p>Cycle through earlier commands in history which match the current entry.</p>
|
||||||
</dd>
|
</dd>
|
||||||
|
@ -680,24 +679,25 @@ process, it replaces <code class="docutils literal notranslate"><span class="pre
|
||||||
with objects that get input from and send output to the Shell window.
|
with objects that get input from and send output to the Shell window.
|
||||||
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
|
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
|
||||||
<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>
|
<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>
|
||||||
|
<p>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 <code class="docutils literal notranslate"><span class="pre">input</span></code> from
|
||||||
|
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,
|
||||||
|
IDLE should be started in a command line window. The secondary subprocess
|
||||||
|
will then be attached to that window for input and output.</p>
|
||||||
|
<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>,
|
||||||
|
IDLE’s changes are lost and input from the keyboard and output to the screen
|
||||||
|
will not work correctly.</p>
|
||||||
<p>When Shell has the focus, it controls the keyboard and screen. This is
|
<p>When Shell has the focus, it controls the keyboard and screen. This is
|
||||||
normally transparent, but functions that directly access the keyboard
|
normally transparent, but functions that directly access the keyboard
|
||||||
and screen will not work. These include system-specific functions that
|
and screen will not work. These include system-specific functions that
|
||||||
determine whether a key has been pressed and if so, which.</p>
|
determine whether a key has been pressed and if so, which.</p>
|
||||||
<p>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 <code class="docutils literal notranslate"><span class="pre">input</span></code> from 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,
|
|
||||||
IDLE should be started in a command line window. The secondary subprocess
|
|
||||||
will then be attached to that window for input and output.</p>
|
|
||||||
<p>The IDLE code running in the execution process adds frames to the call stack
|
<p>The IDLE code running in the execution process adds frames to the call stack
|
||||||
that would not be there otherwise. IDLE wraps <code class="docutils literal notranslate"><span class="pre">sys.getrecursionlimit</span></code> and
|
that would not be there otherwise. IDLE wraps <code class="docutils literal notranslate"><span class="pre">sys.getrecursionlimit</span></code> and
|
||||||
<code class="docutils literal notranslate"><span class="pre">sys.setrecursionlimit</span></code> to reduce the effect of the additional stack frames.</p>
|
<code class="docutils literal notranslate"><span class="pre">sys.setrecursionlimit</span></code> to reduce the effect of the additional stack
|
||||||
<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>,
|
frames.</p>
|
||||||
IDLE’s changes are lost and input from the keyboard and output to the screen
|
<p>When user code raises SystemExit either directly or by calling sys.exit,
|
||||||
will not work correctly.</p>
|
IDLE returns to a Shell prompt instead of exiting.</p>
|
||||||
<p>When user code raises SystemExit either directly or by calling sys.exit, IDLE
|
|
||||||
returns to a Shell prompt instead of exiting.</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="user-output-in-shell">
|
<div class="section" id="user-output-in-shell">
|
||||||
<h3>User output in Shell<a class="headerlink" href="#user-output-in-shell" title="Permalink to this headline">¶</a></h3>
|
<h3>User output in Shell<a class="headerlink" href="#user-output-in-shell" title="Permalink to this headline">¶</a></h3>
|
||||||
|
@ -949,8 +949,8 @@ also used for testing.</p>
|
||||||
<li><a href="https://www.python.org/">Python</a> »</li>
|
<li><a href="https://www.python.org/">Python</a> »</li>
|
||||||
|
|
||||||
|
|
||||||
<li>
|
<li id="cpython-language-and-version">
|
||||||
<a href="../index.html">3.10.0a1 Documentation</a> »
|
<a href="../index.html">3.10.0a5 Documentation</a> »
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> »</li>
|
<li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> »</li>
|
||||||
|
@ -974,7 +974,7 @@ also used for testing.</p>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
© <a href="../copyright.html">Copyright</a> 2001-2020, Python Software Foundation.
|
© <a href="../copyright.html">Copyright</a> 2001-2021, Python Software Foundation.
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
The Python Software Foundation is a non-profit corporation.
|
The Python Software Foundation is a non-profit corporation.
|
||||||
|
@ -982,7 +982,7 @@ also used for testing.</p>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
Last updated on Oct 20, 2020.
|
Last updated on Feb 21, 2021.
|
||||||
<a href="https://docs.python.org/3/bugs.html">Found a bug</a>?
|
<a href="https://docs.python.org/3/bugs.html">Found a bug</a>?
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue