Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Gregory Ewing Newsgroups: comp.lang.python Subject: Re: What should Python apps do when asked to show help? Date: Fri, 29 Apr 2016 18:04:34 +1200 Lines: 17 Message-ID: References: <57223b76$0$22140$c3e8da3$5496439d@news.astraweb.com> <57224382$0$5808$e4fe514c@news.xs4all.nl> <87pot9skqu.fsf@elektro.pacujo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net qbF8+wd5DyaSOpT5AXOMOweIc7ucqVyt4GatZsNn+Q2W8msdWG Cancel-Lock: sha1:upgjZJ+ozohwbQsYVxCz9L3eIJE= User-Agent: Mozilla Thunderbird 1.0.5 (Macintosh/20050711) X-Accept-Language: en-us, en In-Reply-To: <87pot9skqu.fsf@elektro.pacujo.net> Xref: csiph.com comp.lang.python:107842 > Irmen de Jong : > >>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