From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Date: Tue, 6 Nov 2018 03:36:12 +0000 (-0800)
Subject: bpo-35099: Update idlelib/help.html (GH-10353)
X-Git-Tag: v3.7.2rc1~183
X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4a46295a95bc2e7a93bcf0ce4cdaeeeb48729069;p=thirdparty%2FPython%2Fcpython.git
bpo-35099: Update idlelib/help.html (GH-10353)
(This should have been done with the first PR for this issue.)
(cherry picked from commit f1d3efc2fba704692d539acc3cb0376a1dd9d98f)
Co-authored-by: Terry Jan Reedy
If IDLE quits with no message, and it was not started from a console, try
starting from a console (python -m idlelib) and see if a message appears.
With rare exceptions, the result of executing Python code with IDLE is
-intended to be the same as executing the same code in a console window.
+intended to be the same as executing the same code by the default method,
+directly with Python in a text-mode system console or terminal window.
However, the different interface and operation occasionally affect
-visible results. For instance, sys.modules starts with more entries.
IDLE also replaces sys.stdin, sys.stdout, and sys.stderr with
-objects that get input from and send output to the Shell window.
-When Shell has the focus, it controls the keyboard and screen. This is
+visible results. For instance, sys.modules starts with more entries,
+and threading.activeCount() returns 2 instead of 1.
By default, IDLE runs user code in a separate OS process rather than in
+the user interface process that runs the shell and editor. In the execution
+process, it replaces sys.stdin, sys.stdout, and sys.stderr
+with objects that get input from and send output to the Shell window.
+The original values stored in sys.__stdin__, sys.__stdout__, and
+sys.__stderr__ are not touched, but may be None.
When Shell has the focus, it controls the keyboard and screen. This is
normally transparent, but functions that directly access the keyboard
-and screen will not work. If sys is reset with importlib.reload(sys),
-IDLEâs changes are lost and things like input, raw_input, and
-print will not work correctly.
With IDLEâs Shell, one enters, edits, and recalls complete statements.
-Some consoles only work with a single physical line at a time. IDLE uses
-exec to run each statement. As a result, '__builtins__' is always
-defined for each statement.
IDLEâs standard stream replacements are not inherited by subprocesses
+created in the execution process, whether directly by user code or by modules
+such as multiprocessing. If such subprocess use input from sys.stdin
+or print or write to sys.stdout or sys.stderr,
+IDLE should be started in a command line window. The secondary subprocess
+will then be attached to that window for input and output.
If sys is reset by user code, such as with importlib.reload(sys),
+IDLEâs changes are lost and input from the keyboard and output to the screen
+will not work correctly.