Irmen de Jong <irmen.nos...@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
--
https://mail.python.org/mailman/listinfo/python-list