[Python-checkins] cpython (2.7): Issue #22820: Explain need for *print* when running file from Idle editor.
terry.reedy
python-checkins at python.org
Thu Sep 24 07:40:27 CEST 2015
https://hg.python.org/cpython/rev/e7bf0727f7df
changeset: 98231:e7bf0727f7df
branch: 2.7
parent: 98229:e2f1f69d0618
user: Terry Jan Reedy <tjreedy at udel.edu>
date: Thu Sep 24 01:39:25 2015 -0400
summary:
Issue #22820: Explain need for *print* when running file from Idle editor.
files:
Doc/library/idle.rst | 7 ++++++-
Lib/idlelib/help.html | 9 +++++++--
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst
--- a/Doc/library/idle.rst
+++ b/Doc/library/idle.rst
@@ -206,7 +206,12 @@
Run Module
Do Check Module (above). If no error, restart the shell to clean the
- environment, then execute the module.
+ environment, then execute the module. Output is displayed in the Shell
+ window. Note that output requires use of ``print`` or ``write``.
+ When execution is complete, the Shell retains focus and displays a prompt.
+ At this point, one may interactively explore the result of execution.
+ This is similar to executing a file with ``python -i file`` at a command
+ line.
Shell menu (Shell window only)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/Lib/idlelib/help.html b/Lib/idlelib/help.html
--- a/Lib/idlelib/help.html
+++ b/Lib/idlelib/help.html
@@ -223,7 +223,12 @@
Editor window.</dd>
<dt>Run Module</dt>
<dd>Do Check Module (above). If no error, restart the shell to clean the
-environment, then execute the module.</dd>
+environment, then execute the module. Output is displayed in the Shell
+window. Note that output requires use of <tt class="docutils literal"><span class="pre">print</span></tt> or <tt class="docutils literal"><span class="pre">write</span></tt>.
+When execution is complete, the Shell retains focus and displays a prompt.
+At this point, one may interactively explore the result of execution.
+This is similar to executing a file with <tt class="docutils literal"><span class="pre">python</span> <span class="pre">-i</span> <span class="pre">file</span></tt> at a command
+line.</dd>
</dl>
</div>
<div class="section" id="shell-menu-shell-window-only">
@@ -676,7 +681,7 @@
The Python Software Foundation is a non-profit corporation.
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
- Last updated on Sep 23, 2015.
+ Last updated on Sep 24, 2015.
<a href="../bugs.html">Found a bug</a>?
<br />
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.2.3.
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list