@@ -648,14 +648,21 @@ <h3>User output in Shell<a class="headerlink" href="#user-output-in-shell" title
648
648
corresponding output device. When IDLE executes user code, < code class ="docutils literal notranslate "> < span class ="pre "> sys.stdout</ span > </ code >
649
649
and < code class ="docutils literal notranslate "> < span class ="pre "> sys.stderr</ span > </ code > are connected to the display area of IDLE’s Shell. Some of
650
650
its features are inherited from the underlying Tk Text widget. Others
651
- are programmed additions.</ p >
651
+ are programmed additions. Where it matters, Shell is designed for development
652
+ rather than production runs.</ p >
653
+ < p > For instance, Shell never throws away output. A program that sends unlimited
654
+ output to Shell will eventually fill memory, resulting in a memory error.
655
+ In contrast, some system text windows only keep the last n lines of output.
656
+ A Windows console, for instance, keeps a user-settable 1 to 9999 lines,
657
+ with 300 the default.</ p >
652
658
< p > Text widgets display a subset of Unicode, the Basic Multilingual Plane (BMP).
653
659
Which characters get a proper glyph instead of a replacement box depends on
654
660
the operating system and installed fonts. Newline characters cause following
655
- text to appear on a new line, but other control characters are replaced
656
- with a box. But note that the < code class ="docutils literal notranslate "> < span class ="pre "> repr()</ span > </ code > function, which is used for
657
- interactive echo of expression values, replaces control characters
658
- with escape codes before they are output.</ p >
661
+ text to appear on a new line, but other control characters are either
662
+ replaced with a box or deleted. However, < code class ="docutils literal notranslate "> < span class ="pre "> repr()</ span > </ code > , which is used for
663
+ interactive echo of expression values, replaces control characters,
664
+ some BMP codepoints, and all non-BMP characters with escape codes
665
+ before they are output.</ p >
659
666
< p > Normal and error output are generally kept separate (on separate lines)
660
667
from code input and each other. They each get different highlight colors.</ p >
661
668
< p > For SyntaxError tracebacks, the normal ‘^’ marking where the error was
0 commit comments