You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<dt>View Last Restart</dt><dd><p>Scroll the shell window to the last Shell restart.</p>
287
286
</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>
289
288
</dd>
290
289
<dt>Previous History</dt><dd><p>Cycle through earlier commands in history which match the current entry.</p>
291
290
</dd>
@@ -680,24 +679,25 @@ <h3>Running user code<a class="headerlink" href="#running-user-code" title="Perm
680
679
with objects that get input from and send output to the Shell window.
681
680
The original values stored in <codeclass="docutils literal notranslate"><spanclass="pre">sys.__stdin__</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">sys.__stdout__</span></code>, and
682
681
<codeclass="docutils literal notranslate"><spanclass="pre">sys.__stderr__</span></code> are not touched, but may be <codeclass="docutils literal notranslate"><spanclass="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>
687
682
<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 <codeclass="docutils literal notranslate"><spanclass="pre">input</span></code> from sys.stdin
690
-
or <codeclass="docutils literal notranslate"><spanclass="pre">print</span></code> or <codeclass="docutils literal notranslate"><spanclass="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 <codeclass="docutils literal notranslate"><spanclass="pre">input</span></code> from
685
+
sys.stdin or <codeclass="docutils literal notranslate"><spanclass="pre">print</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">write</span></code> to sys.stdout or sys.stderr,
691
686
IDLE should be started in a command line window. The secondary subprocess
692
687
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 <codeclass="docutils literal notranslate"><spanclass="pre">sys.getrecursionlimit</span></code> and
695
-
<codeclass="docutils literal notranslate"><spanclass="pre">sys.setrecursionlimit</span></code> to reduce the effect of the additional stack frames.</p>
696
688
<p>If <codeclass="docutils literal notranslate"><spanclass="pre">sys</span></code> is reset by user code, such as with <codeclass="docutils literal notranslate"><spanclass="pre">importlib.reload(sys)</span></code>,
697
689
IDLE’s changes are lost and input from the keyboard and output to the screen
698
690
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 <codeclass="docutils literal notranslate"><spanclass="pre">sys.getrecursionlimit</span></code> and
697
+
<codeclass="docutils literal notranslate"><spanclass="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>
701
701
</div>
702
702
<divclass="section" id="user-output-in-shell">
703
703
<h3>User output in Shell<aclass="headerlink" href="#user-output-in-shell" title="Permalink to this headline">¶</a></h3>
0 commit comments