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.

Author terry.reedy
Recipients Alex, THRlWiTi, ThePokestarFan, Todd.Rovito, ZackerySpytz, rhettinger, roger.serwy, terry.reedy
Date 2020-07-31.00:54:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
@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.
Date User Action Args
2020-07-31 00:54:24terry.reedysetrecipients: + terry.reedy, rhettinger, roger.serwy, THRlWiTi, Todd.Rovito, Alex, ZackerySpytz, ThePokestarFan
2020-07-31 00:54:24terry.reedysetmessageid: <>
2020-07-31 00:54:24terry.reedylinkissue6143 messages
2020-07-31 00:54:24terry.reedycreate