On Fri, Feb 01, 2019 at 08:40:22PM -0500, Terry Reedy <tjre...@udel.edu> wrote:
> 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.

   For the question "Does Python REPL need more batteries?" is your
answer "No, just point people to IDLE"?
   If it is - well, I disagree. I implemented a lot of enhancements for
REPL myself, and I don't like and avoid GUI programs.

> > * 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

   I found pager ``less`` quite good. I configured it in a complex way,
learned to use it and use in many different programs, not only Python.

> * 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.

   Yep, would be nice to have. Bash implements it somehow.

> Here is another:
> * Clicking on a traceback item can open the file in an editor at the
> indicated line.

   That would be too much. Requires a traceback-sensitive pager. Also
not very useful for situations where developer works on one host and
runs programs on another (containers/virtual machines/remote hosts are
widely used these days).

> -- 
> Terry Jan Reedy

Oleg.
-- 
    Oleg Broytman            https://phdru.name/            p...@phdru.name
           Programmers don't die, they just GOSUB without RETURN.
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to