homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: IDLE editor: shell-like behaviour on line starting with ">>>"
Type: behavior Stage: resolved
Components: IDLE Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: etuardu, ezio.melotti, python-dev, roger.serwy, terry.reedy
Priority: normal Keywords: patch

Created on 2011年09月23日 22:26 by etuardu, last changed 2022年04月11日 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
patch13039.diff roger.serwy, 2011年10月14日 16:40 simple patch
Messages (8)
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) * (Python committer) 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) * (Python committer) 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) * (Python committer) Date: 2011年09月28日 20:48
Do you want to work on a patch?
msg145549 - (view) Author: Roger Serwy (roger.serwy) * (Python committer) 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) (Python triager) 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) * (Python committer) 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.
History
Date User Action Args
2022年04月11日 14:57:21adminsetgithub: 57248
2012年01月16日 00:15:36terry.reedysetstatus: open -> closed
stage: needs patch -> resolved
2012年01月16日 00:14:48terry.reedysetassignee: terry.reedy
resolution: fixed
messages: + msg151310
2012年01月16日 00:09:06python-devsetnosy: + python-dev
messages: + msg151309
2011年10月14日 16:40:48roger.serwysetfiles: + patch13039.diff

nosy: + roger.serwy
messages: + msg145549

keywords: + patch
2011年09月28日 20:48:55ezio.melottisetnosy: + ezio.melotti
messages: + msg144577
2011年09月28日 20:41:31terry.reedysetmessages: + msg144576
2011年09月28日 16:52:44etuardusetmessages: + msg144572
title: IDLE3 editor: shell-like behaviour on line starting with ">>>" -> IDLE editor: shell-like behaviour on line starting with ">>>"
2011年09月28日 02:27:28terry.reedysetversions: + Python 2.7, Python 3.3
nosy: + terry.reedy

messages: + msg144561

stage: needs patch
2011年09月23日 22:26:59etuarducreate

AltStyle によって変換されたページ (->オリジナル) /