[issue21625] Make help() beginner helpful when no PAGER or LESS variable

Nagarajan report at bugs.python.org
Sat Jul 18 12:49:12 EDT 2020


Nagarajan <nag.rajan at gmail.com> added the comment:

I would request us to think about a couple more options while this is under consideration...

Do we want to also add the flags -X and -F to the less options?

The -X flag gets less to show its output inline, instead of a separate screen. The advantage here is that users can now see the last viewed help page right above the prompt even after quitting help. It helps immensely to be able to see the help and write statements based on the help. The minor downside is that the last statements typed on the python prompt have now scrolled farther up.

The -F (or --quit-if-one-screen) flag exits helps automatically if the help contents fit less than one screen-full. This is only useful when used in conjunction with the -X flag. If we do decide to use the -X flag, then this flag becomes an obvious choice.

If we do choose to use these flags, the less command now becomes

    less "-P?e(END) .(q to exit help) " -X --quit-if-one-screen --quit-at-eof

----------
nosy: +nagarajan

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21625>
_______________________________________


More information about the Python-bugs-list mailing list