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.
Created on 2018年06月18日 04:49 by sebastin, last changed 2022年04月11日 14:59 by admin. This issue is now closed.
| Messages (7) | |||
|---|---|---|---|
| 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) * (Python committer) | 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) * (Python committer) | 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 msg243140 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) * (Python committer) | 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) * (Python committer) | 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) * (Python committer) | 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. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:59:01 | admin | set | github: 78074 |
| 2018年06月18日 17:07:14 | terry.reedy | set | messages: + msg319899 |
| 2018年06月18日 15:16:26 | r.david.murray | set | nosy:
+ r.david.murray messages: + msg319887 |
| 2018年06月18日 11:32:06 | steven.daprano | set | nosy:
+ steven.daprano messages: + msg319878 |
| 2018年06月18日 08:44:55 | terry.reedy | set | superseder: IDLE: Patch to make PyShell behave more like a Terminal interface |
| 2018年06月18日 08:44:37 | terry.reedy | set | status: open -> closed resolution: duplicate messages: + msg319870 stage: test needed -> resolved |
| 2018年06月18日 06:54:54 | sebastin | set | messages: + msg319865 |
| 2018年06月18日 05:13:33 | terry.reedy | set | messages:
+ msg319860 stage: test needed |
| 2018年06月18日 04:49:48 | sebastin | create | |