[Python-checkins] cpython (merge 3.2 -> default): Merge with 3.2 #13039 allow proper deletion of '>>> ' in IDLE editor windows.

terry.reedy python-checkins at python.org
Mon Jan 16 01:09:04 CET 2012


http://hg.python.org/cpython/rev/6099d9dd0c26
changeset:   74420:6099d9dd0c26
parent:      74416:40e1be1e0707
parent:      74419:c6e7473b1fb5
user:        Terry Jan Reedy <tjreedy at udel.edu>
date:        Sun Jan 15 19:08:28 2012 -0500
summary:
  Merge with 3.2 #13039 allow proper deletion of '>>> ' in IDLE editor windows.
Patch by Roger Serwy.

files:
  Lib/idlelib/EditorWindow.py |  5 ++++-
  1 files changed, 4 insertions(+), 1 deletions(-)


diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -1134,7 +1134,10 @@
         assert have > 0
         want = ((have - 1) // self.indentwidth) * self.indentwidth
         # Debug prompt is multilined....
-        last_line_of_prompt = sys.ps1.split('\n')[-1]
+        if self.context_use_ps1:
+            last_line_of_prompt = sys.ps1.split('\n')[-1]
+        else:
+            last_line_of_prompt = ''
         ncharsdeleted = 0
         while 1:
             if chars == last_line_of_prompt:

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list