What should Python apps do when asked to show help?

Steven D'Aprano steve at pearwood.info
Sun May 1 06:47:38 EDT 2016


On Sun, 1 May 2016 04:44 pm, Chris Angelico 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. Okay. How is
> an app supposed to know whether or not to use a pager? How do you
> expect them to mindread?

Easy: if the READPAGERENVIRONVAR is set, then the application should read
the PAGER environment variable, otherwise it should ignore it.




-- 
Steven




More information about the Python-list mailing list