Skip to content

Commit 68d6dc0

Browse files
authored
bpo-1529353: Explain Shell text squeezing in the IDLE doc. (python#10169)
1 parent c8a8d6b commit 68d6dc0

File tree

2 files changed

+39
-3
lines changed

2 files changed

+39
-3
lines changed

Doc/library/idle.rst

+20-1
Original file line numberDiff line numberDiff line change
@@ -341,11 +341,18 @@ Set Breakpoint
341341
Clear Breakpoint
342342
Clear the breakpoint on that line.
343343

344-
Shell and Output windows have the following.
344+
Shell and Output windows also have the following.
345345

346346
Go to file/line
347347
Same as in Debug menu.
348348

349+
The Shell window also has an output squeezing facility explained in the
350+
the *Python Shell window* subsection below.
351+
352+
Squeeze
353+
If the cursor is over an output line, squeeze all the output between
354+
the code above and the prompt below down to a 'Squeezed text' label.
355+
349356

350357
Editing and navigation
351358
----------------------
@@ -477,6 +484,9 @@ or immediately run an existing file before editing.
477484
Python Shell window
478485
^^^^^^^^^^^^^^^^^^^
479486

487+
The editing features described above work when entering code interactively.
488+
IDLE's Shell window also responds to the following keys.
489+
480490
* :kbd:`C-c` interrupts executing command
481491

482492
* :kbd:`C-d` sends end-of-file; closes window if typed at a ``>>>`` prompt
@@ -492,6 +502,15 @@ Python Shell window
492502

493503
* :kbd:`Return` while on any previous command retrieves that command
494504

505+
Shell has a special facility for squeezing output lines down to a
506+
'Squeezed text' label. This is done automatically for output over N lines
507+
(N = 50 by default). N can be changed in the PyShell section of the General
508+
page of the Settings dialog. Output with fewer lines can be squeezed by
509+
right clicking on the output. This can be useful for extra long lines.
510+
511+
Squeezed output is expanded in place by double-clicking the label.
512+
It can also be sent to the clipboard or a separate view window by
513+
right-clicking the label.
495514

496515
Text colors
497516
^^^^^^^^^^^

Lib/idlelib/help.html

+19-2
Original file line numberDiff line numberDiff line change
@@ -364,11 +364,18 @@ <h3>Help menu (Shell and Editor)<a class="headerlink" href="#help-menu-shell-and
364364
<dt>Clear Breakpoint</dt>
365365
<dd>Clear the breakpoint on that line.</dd>
366366
</dl>
367-
<p>Shell and Output windows have the following.</p>
367+
<p>Shell and Output windows also have the following.</p>
368368
<dl class="docutils">
369369
<dt>Go to file/line</dt>
370370
<dd>Same as in Debug menu.</dd>
371371
</dl>
372+
<p>The Shell window also has an output squeezing facility explained in the
373+
the <em>Python Shell window</em> subsection below.</p>
374+
<dl class="docutils">
375+
<dt>Squeeze</dt>
376+
<dd>If the cursor is over an output line, squeeze all the output between
377+
the code above and the prompt below down to a ‘Squeezed text’ label.</dd>
378+
</dl>
372379
</div>
373380
</div>
374381
<div class="section" id="editing-and-navigation">
@@ -478,6 +485,8 @@ <h3>Calltips<a class="headerlink" href="#calltips" title="Permalink to this head
478485
</div>
479486
<div class="section" id="python-shell-window">
480487
<h3>Python Shell window<a class="headerlink" href="#python-shell-window" title="Permalink to this headline"></a></h3>
488+
<p>The editing features described above work when entering code interactively.
489+
IDLE’s Shell window also responds to the following keys.</p>
481490
<ul>
482491
<li><p class="first"><kbd class="kbd docutils literal notranslate">C-c</kbd> interrupts executing command</p>
483492
</li>
@@ -493,6 +502,14 @@ <h3>Python Shell window<a class="headerlink" href="#python-shell-window" title="
493502
</ul>
494503
</li>
495504
</ul>
505+
<p>Shell has a special facility for squeezing output lines down to a
506+
‘Squeezed text’ label. This is done automatically for output over N lines
507+
(N = 50 by default). N can be changed in the PyShell section of the General
508+
page of the Settings dialog. Output with fewer lines can be squeezed by
509+
right clicking on the output. This can be useful for extra long lines.</p>
510+
<p>Squeezed output is expanded in place by double-clicking the label.
511+
It can also be sent to the clipboard or a separate view window by
512+
right-clicking the label.</p>
496513
</div>
497514
<div class="section" id="text-colors">
498515
<h3>Text colors<a class="headerlink" href="#text-colors" title="Permalink to this headline"></a></h3>
@@ -797,7 +814,7 @@ <h3>Navigation</h3>
797814
<br />
798815
<br />
799816

800-
Last updated on Oct 27, 2018.
817+
Last updated on Oct 28, 2018.
801818
<a href="https://docs.python.org/3/bugs.html">Found a bug</a>?
802819
<br />
803820

0 commit comments

Comments
 (0)