Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #107809
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: What should Python apps do when asked to show help? |
| Date | Fri, 29 Apr 2016 03:06:22 +1000 |
| Lines | 23 |
| Message-ID | <mailman.199.1461863186.32212.python-list@python.org> (permalink) |
| References | <57223b76$0$22140$c3e8da3$5496439d@news.astraweb.com> <CAPTjJmo+p7J0wsX_RKBXH43zMDJ0n2NB0mag-LGO6BBzyqv7OQ@mail.gmail.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| X-Trace | news.uni-berlin.de k+jEBmHagjWRGKIgfnJ19gU2WFX80iPUz4ZYz/sd9jZg== |
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.002 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'received:209.85.223': 0.03; 'subject:Python': 0.05; 'subject:help': 0.07; 'cc:addr :python-list': 0.09; 'stderr': 0.09; 'stdout': 0.09; 'python': 0.10; 'output': 0.13; '--help': 0.16; '2016': 0.16; 'enough.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:show': 0.16; 'subject:when': 0.16; 'wrote:': 0.16; "wouldn't": 0.16; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'am,': 0.23; '(or': 0.23; 'help.': 0.23; 'written': 0.24; 'header:In-Reply-To:1': 0.24; 'command': 0.26; 'fri,': 0.27; 'least': 0.27; 'message- id:@mail.gmail.com': 0.27; '3-5': 0.29; 'accepts': 0.29; 'allows': 0.30; "i'm": 0.30; 'print': 0.30; 'run': 0.33; 'usually': 0.33; "d'aprano": 0.33; 'steven': 0.33; 'stream': 0.33; 'received:google.com': 0.35; 'could': 0.35; 'text': 0.35; 'something': 0.35; 'but': 0.36; 'received:209.85': 0.36; '(3)': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; '(2)': 0.37; 'received:209': 0.38; '(1)': 0.38; 'sure': 0.39; 'whatever': 0.39; 'application': 0.39; 'show': 0.62; 'more': 0.63; "they're": 0.66; 'programs,': 0.72; 'can:': 0.84; 'chrisa': 0.84; 'to:none': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc; bh=utqCEDNaBcsMDCc7BP/yYxwWwNSKMcB9U4woHy/+7xo=; b=eRWLb6G30tL3QH9rZhrv3J/DTcn7rY97v+fflTGvQqaFpbGV7Uwyr0z1c0oX3SAmJ1 Bfa26MkSOcc5MvVxIBvgMjpXcTpCS7AiGwSuBC9Y6HME/WQa3N1xpZc4ee+dDzwT5Uzn UeKSPkGX+KLYCWNVDZhrAWEMBZVSZ7ZYON0/ndWWKNx8DYQJJEbKlS7Y1icejWFrSLoj IPdV+SmuVurLQRAiSlQ1sosY+96s/QEggVYsxaX3J+5q4nxQ7BG4BcreCj6LyFfqjCQs neeJLUnMvRhmWl7JEzmRjpIOjbKsa2/L/qec45Jb3phvDtFhHIW2z3VebpvH8cfNBnNZ 1RGQ== |
| X-Google-DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc; bh=utqCEDNaBcsMDCc7BP/yYxwWwNSKMcB9U4woHy/+7xo=; b=C1NbhbFvkgsip83pxEM+mVvCy5xLs8LCy/btcbpcrMln085Xhb29/U3fYyXSvU5kYM sm3sYbuYtjdPaJyZ+/gxCkctSNVI4+kHaEuuQI0BiL1KgY2CiTwgqCdYoqE/xV1UfKOx lxm4qS0oXE9+MH7ef0SM0CO3BwHaarg8UxjNXgPjILyJRBInYhWGnjAiJ/p2Xegx/12e Y3NYvOxckMcmhgkA/Pbv+G8SkNTuoPUIJaN37L5qkVWSawCma6Dl50nw9yY42Zdrt3+m CSSpE1Wh2y+Wnhr3pibkPXth+MPu5l528Siwi8Y6JMeZcUUhYHiZu19C/RduP1lMWvKH s6pQ== |
| X-Gm-Message-State | AOPr4FVI5zwIhVzZUpD6LhsMh3+wFrV+JbGNOU1lJHF0LljFx1nOyJD2S7khFfOMRm61rYb3BVEpxlxqeJWL0g== |
| X-Received | by 10.107.169.13 with SMTP id s13mr17877490ioe.19.1461863183056; Thu, 28 Apr 2016 10:06:23 -0700 (PDT) |
| In-Reply-To | <57223b76$0$22140$c3e8da3$5496439d@news.astraweb.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.22 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| X-Mailman-Original-Message-ID | <CAPTjJmo+p7J0wsX_RKBXH43zMDJ0n2NB0mag-LGO6BBzyqv7OQ@mail.gmail.com> |
| X-Mailman-Original-References | <57223b76$0$22140$c3e8da3$5496439d@news.astraweb.com> |
| Xref | csiph.com comp.lang.python:107809 |
Show key headers only | View raw
On Fri, Apr 29, 2016 at 2:33 AM, Steven D'Aprano <steve@pearwood.info> wrote: > I have an application written in Python which accepts -h or --help to show > help. I can: > > (1) print the help text to stdout; > > (2) run the help text through a pager; > > (3) do something else? > > > Many command line tools simply output help to stdout (or stderr, if they're > evil), I'm not sure stderr is particularly more evil than stdout, but whatever :) What you could do is run the help text through a pager only if stdout is a TTY. That allows it to be grepped conveniently, but also browsed easily. But I wouldn't worry about that unless you have at least 3-5 pages of screed - for most programs, just dumping the text to a standard stream is usually enough. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
What should Python apps do when asked to show help? Steven D'Aprano <steve@pearwood.info> - 2016-04-29 02:33 +1000
Re: What should Python apps do when asked to show help? alister <alister.ware@ntlworld.com> - 2016-04-28 16:45 +0000
RE: What should Python apps do when asked to show help? Dan Strohl <D.Strohl@F5.com> - 2016-04-28 17:02 +0000
Re: What should Python apps do when asked to show help? John Wong <gokoproject@gmail.com> - 2016-04-28 13:05 -0400
RE: What should Python apps do when asked to show help? Dan Strohl <D.Strohl@F5.com> - 2016-04-28 17:25 +0000
Re: What should Python apps do when asked to show help? Ethan Furman <ethan@stoneleaf.us> - 2016-04-28 10:27 -0700
Re: What should Python apps do when asked to show help? Ethan Furman <ethan@stoneleaf.us> - 2016-04-28 09:49 -0700
Re: What should Python apps do when asked to show help? Chris Angelico <rosuav@gmail.com> - 2016-04-29 03:06 +1000
Re: What should Python apps do when asked to show help? Irmen de Jong <irmen.NOSPAM@xs4all.nl> - 2016-04-28 19:08 +0200
Re: What should Python apps do when asked to show help? Marko Rauhamaa <marko@pacujo.net> - 2016-04-28 20:31 +0300
Re: What should Python apps do when asked to show help? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-04-29 18:04 +1200
RE: What should Python apps do when asked to show help? Dan Strohl <D.Strohl@F5.com> - 2016-04-28 17:32 +0000
Re: What should Python apps do when asked to show help? Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-04-28 20:30 +0300
Re: What should Python apps do when asked to show help? Random832 <random832@fastmail.com> - 2016-04-28 13:30 -0400
Re: What should Python apps do when asked to show help? Grant Edwards <grant.b.edwards@gmail.com> - 2016-04-28 17:33 +0000
RE: What should Python apps do when asked to show help? Dan Strohl <D.Strohl@F5.com> - 2016-04-28 17:39 +0000
Re: What should Python apps do when asked to show help? Random832 <random832@fastmail.com> - 2016-04-28 13:40 -0400
Re: What should Python apps do when asked to show help? Grant Edwards <grant.b.edwards@gmail.com> - 2016-04-28 18:14 +0000
Re: What should Python apps do when asked to show help? Marko Rauhamaa <marko@pacujo.net> - 2016-04-28 21:31 +0300
Re: What should Python apps do when asked to show help? Grant Edwards <grant.b.edwards@gmail.com> - 2016-04-28 19:39 +0000
Re: What should Python apps do when asked to show help? Random832 <random832@fastmail.com> - 2016-04-28 15:51 -0400
Re: What should Python apps do when asked to show help? Grant Edwards <grant.b.edwards@gmail.com> - 2016-04-28 21:08 +0000
Re: What should Python apps do when asked to show help? Steven D'Aprano <steve@pearwood.info> - 2016-04-29 11:40 +1000
manpage writing [rst, asciidoc, pod] was [Re: What should Python apps do when asked to show help?] "Martin A. Brown" <martin@linux-ip.net> - 2016-04-29 06:32 -0700
Re: manpage writing [rst, asciidoc, pod] was [Re: What should Python apps do when asked to show help?] Ethan Furman <ethan@stoneleaf.us> - 2016-04-29 07:06 -0700
Re: manpage writing [rst, asciidoc, pod] was [Re: What should Python apps do when asked to show help?] Rustom Mody <rustompmody@gmail.com> - 2016-04-29 08:17 -0700
Re: manpage writing [rst, asciidoc, pod] was [Re: What should Python apps do when asked to show help?] Ben Finney <ben+python@benfinney.id.au> - 2016-04-30 12:25 +1000
Re: manpage writing [rst, asciidoc, pod] was [Re: What should Python apps do when asked to show help?] Rustom Mody <rustompmody@gmail.com> - 2016-04-29 20:20 -0700
Re: manpage writing [rst, asciidoc, pod] was [Re: What should Python apps do when asked to show help?] Paul Rubin <no.email@nospam.invalid> - 2016-04-29 21:06 -0700
Re: manpage writing [rst, asciidoc, pod] was [Re: What should Python apps do when asked to show help?] Rustom Mody <rustompmody@gmail.com> - 2016-04-29 23:37 -0700
Re: manpage writing [rst, asciidoc, pod] was [Re: What should Python apps do when asked to show help?] Paul Rubin <no.email@nospam.invalid> - 2016-04-30 00:44 -0700
Writing manual pages using Python code (was: manpage writing) Ben Finney <ben+python@benfinney.id.au> - 2016-04-30 12:25 +1000
Re: What should Python apps do when asked to show help? cs@zip.com.au - 2016-05-01 10:06 +1000
Re: What should Python apps do when asked to show help? Paul Rubin <no.email@nospam.invalid> - 2016-04-28 19:15 -0700
Re: What should Python apps do when asked to show help? Rustom Mody <rustompmody@gmail.com> - 2016-04-28 22:00 -0700
Re: What should Python apps do when asked to show help? Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-04-29 09:02 +0300
Re: What should Python apps do when asked to show help? Steven D'Aprano <steve@pearwood.info> - 2016-04-29 19:36 +1000
Re: What should Python apps do when asked to show help? Rustom Mody <rustompmody@gmail.com> - 2016-04-29 02:53 -0700
Re: What should Python apps do when asked to show help? Steven D'Aprano <steve@pearwood.info> - 2016-04-30 11:20 +1000
Re: What should Python apps do when asked to show help? Ethan Furman <ethan@stoneleaf.us> - 2016-04-29 19:09 -0700
Re: What should Python apps do when asked to show help? Random832 <random832@fastmail.com> - 2016-04-29 22:16 -0400
Re: What should Python apps do when asked to show help? Rustom Mody <rustompmody@gmail.com> - 2016-04-29 19:27 -0700
Re: What should Python apps do when asked to show help? Random832 <random832@fastmail.com> - 2016-04-29 22:36 -0400
Re: What should Python apps do when asked to show help? Rustom Mody <rustompmody@gmail.com> - 2016-04-29 19:46 -0700
Re: What should Python apps do when asked to show help? Random832 <random832@fastmail.com> - 2016-04-29 23:14 -0400
Re: What should Python apps do when asked to show help? Ben Finney <ben+python@benfinney.id.au> - 2016-04-30 12:49 +1000
Re: What should Python apps do when asked to show help? Steven D'Aprano <steve@pearwood.info> - 2016-04-30 13:23 +1000
Re: What should Python apps do when asked to show help? Ben Finney <ben+python@benfinney.id.au> - 2016-04-30 14:06 +1000
Re: What should Python apps do when asked to show help? Random832 <random832@fastmail.com> - 2016-04-30 00:16 -0400
Re: What should Python apps do when asked to show help? Rustom Mody <rustompmody@gmail.com> - 2016-04-29 21:34 -0700
Re: What should Python apps do when asked to show help? Random832 <random832@fastmail.com> - 2016-04-30 01:20 -0400
Re: What should Python apps do when asked to show help? cs@zip.com.au - 2016-05-01 09:51 +1000
Re: What should Python apps do when asked to show help? Steven D'Aprano <steve@pearwood.info> - 2016-05-01 14:28 +1000
Re: What should Python apps do when asked to show help? Random832 <random832@fastmail.com> - 2016-04-30 20:41 -0400
Re: What should Python apps do when asked to show help? Grant Edwards <grant.b.edwards@gmail.com> - 2016-05-01 02:30 +0000
Re: What should Python apps do when asked to show help? Random832 <random832@fastmail.com> - 2016-04-30 23:46 -0400
csiph-web