[Python-ideas] Option of running shell/console commands inside the REPL
Terry Reedy
tjreedy at udel.edu
Fri Feb 1 20:40:22 EST 2019
On 2/1/2019 3:31 PM, Oleg Broytman wrote:
> Python REPL is missing the following batteries:
That is why, on Windows, I nearly always use IDLE.
> * Persistent history;
IDLE's Shell history persists across restarts (which
are not available is the standard shell). I cannot remember wanting
history saved between IDLE sessions. I also cannot remember seeing a
request for this feature. If I want a sequence of commands saved, I
copy them into an editor window and save in a named file.
> * Syntax highlighting;
IDLE does this.
> * Clear separation (using, for example, different colors)
> between input, output and errors;
IDLE does this.
> * Paging of very long output/errors.
Help output *is* paged in the standard shell. For comparison with IDLE,
for issue 35855, I tried out help(tkinter) in standard Python on both
Windows and Mac. For the most part, I found the pagers to be somewhat
obnoxious and deficient*. Except for one thing that I want to fix,
paging up an down a window with the standard PageUp and PageDown keys,
as in IDLE, is easier and better. And it is not limited
* Windows Console holds a maximum of 9999 characters, with the default
being 300, at least for Command Prompt. The less pager, at least on
Mac, when invoked by help when running Python in Terminal, displays the
paged output in a separate window. When less is exited, the window
closes and the paged output *disappears*.
You left out what I think is a very important 'battery':
* Works with Python statements instead of physical lines of text.
As I discussed elsewhere, this includes editing entire multiline
statements before submitting and storing and retrieving complete
statements to and from the history list.
Here is another:
* Clicking on a traceback item can open the file in an editor at the
indicated line.
--
Terry Jan Reedy
More information about the Python-ideas
mailing list