What should Python apps do when asked to show help?

Grant Edwards grant.b.edwards at gmail.com
Sun May 1 09:53:39 EDT 2016


On 2016-05-01, Chris Angelico <rosuav at gmail.com> wrote:
> On Sun, May 1, 2016 at 3:24 PM,  <cs at zip.com.au> wrote:
>> Yes, PAGER=cat would make "man" also not page, and likely almost everything.
>> And yet I am unwilling to do so. Why?
>>
>> On reflection, my personal problems with this approach are twofold:
>>
>> - I want $PAGER to specify my preferred pager when I do want a pager, so
>> setting it to "cat" does not inform apps about my wishes
>
> So you expect the environment variable to say which of multiple pagers
> you might want, but only when you already want a pager.

Yes!

Just like EDITOR specifies which editor to use _when_ _you_ _want_
_to_ _use_ _an_ _editor_.  It doesn't tell programs to invoke an
editor all the time.

> Okay. How is an app supposed to know whether or not to use a pager?

Command line option.

> How do you expect them to mindread?

Nope, just recognize '-p' or somesuch.

-- 
Grant





More information about the Python-list mailing list