What should Python apps do when asked to show help?
Gregory Ewing
greg.ewing at canterbury.ac.nz
Fri Apr 29 02:04:34 EDT 2016
> Irmen de Jong <irmen.NOSPAM at xs4all.nl>:
>
>>if sys.stdout.isatty():
>> #....use a pager to display help text
>>else:
>> #....print all help text normally
I think nowadays it's an anti-pattern for programs to
do their own pagination. Very often the "terminal" is
a GUI application with its own facilities for scrolling
and searching that are much nicer to use. I prefer the
program to just give me the output and get out of the
way. If I want a clunky tty-oriented pager I'll pipe
it to "more".
--
Greg
More information about the Python-list
mailing list