[Python-ideas] Cleaner separation of help() and interactive help.
Mike Meyer
mwm at mired.org
Tue Feb 8 02:34:54 CET 2011
On Tue, 08 Feb 2011 12:24:55 +1100
Ben Finney <ben+python at benfinney.id.au> wrote:
> Terry Reedy <tjreedy at udel.edu> writes:
>
> > On 2/7/2011 3:21 PM, Ron Adam wrote:
> >
> > > It also can be annoying (to me) when I use help and the result is
> > > cleared after the pager is done with it. […]
> >
> > ?? On windows, both the command prompt and IDLE shell windows keep the
> > help text. I scroll up and down all the time. Multi-screen text would
> > be pretty useless otherwise. I consider any other behavior buggy.
>
> The default pager program on many GNU+Linux systems is ‘less’. The
> default behaviour of ‘less’ when it quits is to restore the screen
> contents to what they were before the program started.
Not quite.
> Actually, I can't find any way to configure ‘less’ not to do that.
That's because this behavior isn't controlled by less, it's controlled
by TERMINFO. For some reason, the xterm terminal de-initialization
strings in TERMINFO clears the screen. This is different from TERMCAP,
and as others have noted, can be really annoying.
One fix for this is to fix the TERMINFO entries, but that's 1) not
universal, and 2) probably another battle last to the barbarians. An
easier fix is to feed less the "-X" flag (via either the LESS or MORE
environment variables, depending on which your fingers know), which
causes it to not use the TERMINFO initialization/de-initialization
strings. I recommend using -c with it, which clears the screen and
draws from the top, so you get a screen clear at startup.
<mike
--
Mike Meyer <mwm at mired.org> http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
More information about the Python-ideas
mailing list