msg144478 - (view) |
Author: etuardu (etuardu) |
Date: 2011-09-23 22:26 |
In the editor window, if a line starts with the shell prompt string ">>>", backspacing is inhibited when reaching the first space, just like in the shell window. OS: Linux 2.6.38-11-generic-pae #50-Ubuntu i386 GNU/Linux Python version: 3.2 IDLE version: 3.2 Tk version: 8.5 |
|
|
msg144561 - (view) |
Author: Terry J. Reedy (terry.reedy) *  |
Date: 2011-09-28 02:27 |
Yes, it is a real nuisance when pasting code that has '>>>'. You have to select and delete to get rid of each. This is related to #1178, but this bug should be fixed if possible even if that were implemented. |
|
|
msg144572 - (view) |
Author: etuardu (etuardu) |
Date: 2011-09-28 16:52 |
Note that this does not affect just pasted code, you can reproduce it typing on a new line three greater-than signs plus a space, and then trying to use backspace. One might want to legitimately do that in a module docstring, e.g.: """This module provides this: >>> foo() True """ |
|
|
msg144576 - (view) |
Author: Terry J. Reedy (terry.reedy) *  |
Date: 2011-09-28 20:41 |
Right. That is how I reconfirmed that the bug still exists in 3.2.2, and why I said it should be fixed. |
|
|
msg144577 - (view) |
Author: Ezio Melotti (ezio.melotti) *  |
Date: 2011-09-28 20:48 |
Do you want to work on a patch? |
|
|
msg145549 - (view) |
Author: Roger Serwy (roger.serwy) *  |
Date: 2011-10-14 16:40 |
Here's a patch. The smart_backspace_event code considers sys.ps1 even though it's not a PyShell instance. The "context_use_ps1" flag is already used to modify other behavior of the editor window when it is a PyShell instance, so it is appropriate to use it here as well. |
|
|
msg151309 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2012-01-16 00:09 |
New changeset 95b704cb7f7c by Terry Jan Reedy in branch '2.7': #13039 allow proper deletion of '>>> ' in IDLE editor windows. http://hg.python.org/cpython/rev/95b704cb7f7c New changeset c6e7473b1fb5 by Terry Jan Reedy in branch '3.2': #13039 allow proper deletion of '>>> ' in IDLE editor windows. http://hg.python.org/cpython/rev/c6e7473b1fb5 New changeset 6099d9dd0c26 by Terry Jan Reedy in branch 'default': Merge with 3.2 #13039 allow proper deletion of '>>> ' in IDLE editor windows. http://hg.python.org/cpython/rev/6099d9dd0c26 |
|
|
msg151310 - (view) |
Author: Terry J. Reedy (terry.reedy) *  |
Date: 2012-01-16 00:14 |
I tested with 3.2.2 on Win7. Deletes prompt in editor window with both backspace and delete keys, but not prompt in shell. EditorWindow.py is identical in all three branches, at least in this area, so pushed. One nuisance gone. Thanks Roger. |
|
|