What should Python apps do when asked to show help?

Steven D'Aprano steve at pearwood.info
Fri Apr 29 05:36:50 EDT 2016


On Fri, 29 Apr 2016 03:00 pm, Rustom Mody wafted information-rich pheromones
into the air, where they diffused rapidly:

> Quite bewildered by this thread...
> Are we in 2016?
> [Reminds me of the bizarre claim that world has not moved on from text]

(For the benefit of those of us still stuck in the 2000s, I have transcribed
Rustom's pheromones into the obsolete medium of text.)


> eg I am on on Ubuntu 16.4 (vanilla) right now.
> This means that when I pull up a terminal I get gnome-terminal.
> Which means that when the screen fills up I get a scroll bar

Yes. So do I.

Of course, some applications (like screen) interfere with that, but even
when you have a scroll bar, having to scroll back more than a few pages is
a PITA. If you set the number of scrollback lines too low, you run out and
the things you are interested in disappears past the top... and if you set
it too high, it's too hard to locate the section that you actually want.

The bottom line is, screen real estate is a valuable resource, but even more
valuable is human attention, and pagers are a way of managing attention.
Screen space is not necessary rare, but neither is it something that we can
just consume thoughtlessly. Hence we have a whole range of options
available to us, to make the most of screen space:

- multiple windows;
- multiple tabs within each window;
- scroll bars within each tab;
- and pagers.

Think of a pager as being somewhat like a popup window for text: at the very
low cost of a single line of space in your terminal, you can "pop up" the
text, read it, and dismiss it again without using up any of the screen
space in your scrolling text view. (Apart from that one line.)


> IOW pager functionality is quite builtin in shells nowadays

Apart from those where they're not.


> Why replicate and cause annoyance?

If you don't want to use the functionality, don't.



-- 
Steven




More information about the Python-list mailing list