Page 1 of 1

Editing in Python 3.5.3 Shell

Posted: Fri May 17, 2019 7:51 pm
by Daveolw1
Editing in Python 3.5.3 Shell why does the "undo", "copy", "Paste" and keyboard "delete", "back space" not work?
If you make a mistake I cannot see how to go back.

Re: Editing in Python 3.5.3 Shell

Posted: Fri May 17, 2019 9:52 pm
by Paeryn
Python's interactive shell uses the GNU Readline library for editing, seems to be working exactly as it should here. Note that IDLE's shell (and any other IDE's shell) is likely to have their own editing methods.

Link to Readline's editing commands

Re: Editing in Python 3.5.3 Shell

Posted: Fri May 17, 2019 11:41 pm
by klricks
Daveolw1 wrote:
Fri May 17, 2019 7:51 pm
Editing in Python 3.5.3 Shell why does the "undo", "copy", "Paste" and keyboard "delete", "back space" not work?
If you make a mistake I cannot see how to go back.
All those commands do work on a single line of text before the [Enter] key is pressed. Copy & Paste works for previously entered code. However IMO the shell was not meant to be used to enter lengthy or multiple lines of code. Most would open a file for editing and use the IDLE editor. All the editing commands work as expected inside the editor.
The shell only being used to interact with a running program if applicable, and to show error messages when your code has crashed.

Re: Editing in Python 3.5.3 Shell

Posted: Sat May 18, 2019 9:49 am
by Daveolw1
Thanks for information.

David