From: Terry Jan Reedy Date: Thu, 25 Aug 2016 05:21:54 +0000 (-0400) Subject: Issue #25564: Mention exec and __builtins__ in IDLE-console difference section. X-Git-Tag: v2.7.13rc1~197 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=558c0de2d4edd1172fd175e642cc8de947d05662;p=python Issue #25564: Mention exec and __builtins__ in IDLE-console difference section. Do not print charrefs outside of the text proper (like '—»»»» '). --- diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst index 729ca6e89c..866eac4956 100644 --- a/Doc/library/idle.rst +++ b/Doc/library/idle.rst @@ -562,7 +562,9 @@ 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. +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. Running without a subprocess ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/Lib/idlelib/help.html b/Lib/idlelib/help.html index 7e79e6d679..f6823488c3 100644 --- a/Lib/idlelib/help.html +++ b/Lib/idlelib/help.html @@ -6,7 +6,7 @@ - 24.6. IDLE — Python 2.7.11 documentation + 24.6. IDLE — Python 2.7.12 documentation @@ -14,7 +14,7 @@ - + @@ -58,13 +58,13 @@ accesskey="P">previous |
  • -
  • Python »
  • +
  • Python »
  • - Python 2.7.11 documentation » + Python 2.7.12 documentation »
  • - - + + @@ -490,7 +490,7 @@ executed in the Tk namespace, so this file is not useful for importing functions to be used from IDLE’s Python shell.

    24.6.3.1. Command line usage¶

    -
    idle.py [-c command] [-d] [-e] [-h] [-i] [-r file] [-s] [-t title] [-] [arg] ...
    +
    idle.py [-c command] [-d] [-e] [-h] [-i] [-r file] [-s] [-t title] [-] [arg] ...
     
     -c command  run command in the shell window
     -d          enable debugger and open shell window
    @@ -527,7 +527,9 @@ and screen will not work.  If s
     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.

    +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.

    24.6.3.3. Running without a subprocess¶

    @@ -655,14 +657,11 @@ are currently:

    @@ -686,13 +685,13 @@ are currently:

    >previous |
  • -
  • Python »
  • +
  • Python »
  • - Python 2.7.11 documentation » + Python 2.7.12 documentation »
  • - - + +
    diff --git a/Lib/idlelib/help.py b/Lib/idlelib/help.py index ba098ca308..8599b13d9c 100644 --- a/Lib/idlelib/help.py +++ b/Lib/idlelib/help.py @@ -150,7 +150,8 @@ class HelpParser(HTMLParser): self.text.insert('end', d, (self.tags, self.chartags)) def handle_charref(self, name): - self.text.insert('end', unichr(int(name))) + if self.show: + self.text.insert('end', unichr(int(name))) class HelpText(Text):