What should Python apps do when asked to show help?

Chris Angelico rosuav at gmail.com
Sun May 1 07:23:27 EDT 2016


On Sun, May 1, 2016 at 8:55 PM, Steven D'Aprano <steve at pearwood.info> wrote:
> On Sun, 1 May 2016 05:28 pm, cs at zip.com.au wrote:
>
>> On 01May2016 16:44, Chris Angelico <rosuav at gmail.com> wrote:
>
>>>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?
>>
>> I think for several of us, we do not expect the app to mindread. Don't
>> page for short output!
>
> Is there an environment variable to tell the application what you
> consider "short", or should it read your mind?

How about $LINES? If it's less than that, it'll fit on one screen. Of
course, that still won't be perfect, but it's a definite improvement
over guessing.

ChrisA



More information about the Python-list mailing list