<liclass="nav-item nav-item-1"><ahref="index.html">The Python Standard Library</a>»</li>
<liclass="nav-item nav-item-1"><ahref="index.html">The Python Standard Library</a>»</li>
...
@@ -372,8 +372,8 @@ debugger. Breakpoints for a file are saved in the user’s .idlerc directory.</
...
@@ -372,8 +372,8 @@ debugger. Breakpoints for a file are saved in the user’s .idlerc directory.</
<dt>Go to file/line</dt>
<dt>Go to file/line</dt>
<dd>Same as in Debug menu.</dd>
<dd>Same as in Debug menu.</dd>
</dl>
</dl>
<p>The Shell window also has an output squeezing facility explained in the
<p>The Shell window also has an output squeezing facility explained in the<em>Python
the <em>Python Shell window</em> subsection below.</p>
Shell window</em> subsection below.</p>
<dlclass="docutils">
<dlclass="docutils">
<dt>Squeeze</dt>
<dt>Squeeze</dt>
<dd>If the cursor is over an output line, squeeze all the output between
<dd>If the cursor is over an output line, squeeze all the output between
...
@@ -673,24 +673,22 @@ output to Shell will eventually fill memory, resulting in a memory error.
...
@@ -673,24 +673,22 @@ output to Shell will eventually fill memory, resulting in a memory error.
In contrast, some system text windows only keep the last n lines of output.
In contrast, some system text windows only keep the last n lines of output.
A Windows console, for instance, keeps a user-settable 1 to 9999 lines,
A Windows console, for instance, keeps a user-settable 1 to 9999 lines,
with 300 the default.</p>
with 300 the default.</p>
<p>A Tk Text widget, and hence IDLE’s Shell, displays characters (codepoints)
<p>A Tk Text widget, and hence IDLE’s Shell, displays characters (codepoints) in
in the the BMP (Basic Multilingual Plane) subset of Unicode.
the BMP (Basic Multilingual Plane) subset of Unicode. Which characters are
Which characters are displayed with a proper glyph and which with a
displayed with a proper glyph and which with a replacement box depends on the
replacement box depends on the operating system and installed fonts.
operating system and installed fonts. Tab characters cause the following text
Tab characters cause the following text to begin after
to begin after the next tab stop. (They occur every 8 ‘characters’). Newline
the next tab stop. (They occur every 8 ‘characters’).
characters cause following text to appear on a new line. Other control
Newline characters cause following text to appear on a new line.
characters are ignored or displayed as a space, box, or something else,
Other control characters are ignored or displayed as a space, box, or
depending on the operating system and font. (Moving the text cursor through
something else, depending on the operating system and font.
such output with arrow keys may exhibit some surprising spacing behavior.)</p>
(Moving the text cursor through such output with arrow keys may exhibit
<divclass="highlight-python3 notranslate"><divclass="highlight"><pre><span></span><spanclass="gp">>>></span><spanclass="n">s</span><spanclass="o">=</span><spanclass="s1">'a</span><spanclass="se">\t</span><spanclass="s1">b</span><spanclass="se">\a</span><spanclass="s1"><</span><spanclass="se">\x02</span><spanclass="s1">><</span><spanclass="se">\r</span><spanclass="s1">></span><spanclass="se">\b</span><spanclass="s1">c</span><spanclass="se">\n</span><spanclass="s1">d'</span><spanclass="c1"># Enter 22 chars.</span>
<spanclass="gp">>>></span><spanclass="nb">print</span><spanclass="p">(</span><spanclass="n">s</span><spanclass="p">,</span><spanclass="n">end</span><spanclass="o">=</span><spanclass="s1">''</span><spanclass="p">)</span><spanclass="c1"># Display s as is.</span>
'a\tb\x07<\x02><\r>\x08c\nd'
<spanclass="go"># Result varies by OS and font. Try it.</span>
>>> print(s, end='') # Display s as is.
# Result varies by OS and font. Try it.
</pre></div>
</pre></div>
</div>
</div>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">repr</span></code> function is used for interactive echo of expression
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">repr</span></code> function is used for interactive echo of expression