Terry J. Reedy <tjre...@udel.edu> added the comment:

@Pokerstar: First we have to agree on several things.

1. What is the need, what are the use cases? When do *you* feel a need to clear 
the shell?

2. What is the basic strategy?
 a. Delete selections: make delete, backspace, and cut work in the shell, as in 
editor.
    I prefer this.  No new doc or menu entries needed.
    People can delele less than everything.
 b. New feature. All or nothing.  Changes 8 files.  There was discussin of how 
to delete, but seems not difficult.

3. Details need to be agreed on.
  If new feature, menu entry and shortcut: I thing 'Clear shell' is enough.  
Patch disagrees with discussion on shortcut.
  Should header be deleted or left?  (Delete selection lets user decide.)
  Should deleted text be undoable?  We do not currently allow any editing of 
shell history?  Undo amounts to pasting or retyping, and if we do not allow 
pasting or typing in general, why with undo?
  Should squeezes text be expanded?  I think not.  help(tkinter) produces over 
22000 lines.
  Should the current prompt and any code be deleted?  I think not.  If prompt 
gets deleted, it has to be re-written, but without current in-process entry.
  Should remote process be restarted?  Why?  This can easily be done 
independently and might not be wanted.
  <probably something else>

4. New behavior must be tested.  The is usually the hardest part of a patch, 
which is why it is neglected.  Incomplete testing may result in adding a new 
bug.  It was just reported that closing IDLE while the Shell is waiting for a 
response to input(prompt) leads to incomplete shutdown and a zombie process.  
On macOS, this can lead to a crash and possibly a need to reboot.
  So, should we allow clearing, deletion while user code is executing?  While 
user code is requesting input?  Or must we prohibit?  I don't know, other than 
this must be tested at least on Windows and macOS.

Overall, I prefer to use the deletion mechanism we have, rather than add a new 
one.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue6143>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to