Daveolw1
Posts: 23
Joined: Thu May 16, 2019 10:24 am

Editing in Python 3.5.3 Shell

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.

User avatar
Paeryn
Posts: 2636
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: Editing in Python 3.5.3 Shell

Fri May 17, 2019 9:52 pm

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
She who travels light — forgot something.

klricks
Posts: 6550
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Editing in Python 3.5.3 Shell

Fri May 17, 2019 11:41 pm

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.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

Daveolw1
Posts: 23
Joined: Thu May 16, 2019 10:24 am

Re: Editing in Python 3.5.3 Shell

Sat May 18, 2019 9:49 am

Thanks for information.

David

Return to “Python”