msg319857 - (view) |
Author: sebastin (sebastin) |
Date: 2018-06-18 04:49 |
simple linux terminal support in python shell, like clear, ctrl + r, up arrow would be really good to have. |
|
|
msg319860 - (view) |
Author: Terry J. Reedy (terry.reedy) *  |
Date: 2018-06-18 05:13 |
Are you talking about the python shell, run in a text console window, or IDLE's GUI shell? The components you mark include both. If the former, do you mean only on linux or all systems? You and Python are more or less at the mercy of the console you use + readline. If you mean IDLE's Shell, you must give details: what key, what action. Is so, I suspect that at least some of your requests are either rejected or open issues. |
|
|
msg319865 - (view) |
Author: sebastin (sebastin) |
Date: 2018-06-18 06:54 |
I meant this on Python IDLE across all platforms. basic necessary enhancements for seamless use of IDLE should atleast have below feature supported. clear(used in MAC/LINUX TERMINAL) or cls(used in WINDOWS CMD PROMPT) - clear the PYTHON IDLE screen. up arrow - for the search history. If this enhancements is in progress/open state then its good, if rejected this be reconsidered ? |
|
|
msg319870 - (view) |
Author: Terry J. Reedy (terry.reedy) *  |
Date: 2018-06-18 08:44 |
These issues are not as simple as you think. But anyway, clearing the shell in #6143. Shell is a modified editor. Currently, the arrows move the cursor around just as in the editor. For multiline statements, this is essential, and even for single-line statements, not as useless as some claim. Single-line command consoles can get away with changing the meaning of Up and Down. This is discussed in #2704, and what I said above is explained more in of May 2015. I have a question about Linux consoles. Windows Command Prompt is strictly a command *line* console. It sees >>> def fib(n): ... if n >= 2: ... return fib(n-2) + fib(n-1) ... else: ... return n as 5 commands. Its history mechanism retrieves a line at a time. Does a Linux console retrieve all 5 at once, as IDLE does? |
|
|
msg319878 - (view) |
Author: Steven D'Aprano (steven.daprano) *  |
Date: 2018-06-18 11:32 |
Terry asked: > I have a question about Linux consoles. [...] Does a Linux console retrieve all 5 at once, as IDLE does? Not typically. Like the Windows console, Linux consoles are also line-oriented, and hitting up-arrow cycles through each line, one at a time. The bash shell offers a special "operate-and-go-next" command to operate on a particular history line and then immediately retrieve the next history line: http://web.mit.edu/gnu/doc/html/features_7.html but I think that's about as close as any standard Linux console gets to the ability to retrieve multiple lines from history at once. |
|
|
msg319887 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2018-06-18 15:16 |
zsh lets you edit multiline shell commands as a unit. If you up-arrow, you get all the lines of the block popped up, with the cursor on the last line. Further arrow keys will navigate within the multiline text block, with an up-arrow from the first line taking you to the next previous shell command, and enter within the block will re-execute the entire modified multiline command. I haven't used IDLE recently enough to remember how that compares to how IDLE works. |
|
|
msg319899 - (view) |
Author: Terry J. Reedy (terry.reedy) *  |
Date: 2018-06-18 17:07 |
Thanks. I have presumed that Linux consoles are also line oriented, but hesitated to say so without really knowing so. |
|
|