Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #107811
| Path | csiph.com!goblin2!goblin.stu.neva.ru!feeder1.cambriumusenet.nl!feed.tweaknews.nl!195.62.100.242.MISMATCH!newsfeed.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Dan Strohl <D.Strohl@F5.com> |
| Newsgroups | comp.lang.python |
| Subject | RE: What should Python apps do when asked to show help? |
| Date | Thu, 28 Apr 2016 17:25:54 +0000 |
| Lines | 28 |
| Message-ID | <mailman.200.1461864359.32212.python-list@python.org> (permalink) |
| References | <57223b76$0$22140$c3e8da3$5496439d@news.astraweb.com> <p6rUy.23471$Sk5.1393@fx45.am4> <118360c7f0a4498e8ed35d6dd15b7ac0@seaexchmbx03.olympus.F5Net.com> <CACCLA562OqV9Sb534mLFwDm6XFgH9Jp68GUfV_KazT9CVDTt9A@mail.gmail.com> <d41d72915163429fa45de4787a28ac4b@seaexchmbx03.olympus.F5Net.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="utf-8" |
| Content-Transfer-Encoding | base64 |
| X-Trace | news.uni-berlin.de 24TR6ccQzZ1CafX5vRmMSgcRR9/GQwSUSRXB1FUMqIVw== |
| Return-Path | <prvs=91944878d=D.Strohl@f5.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; 'subject:help': 0.07; 'cc:addr:python-list': 0.09; 'url:github': 0.09; 'yeah,': 0.09; 'email addr:python.org>': 0.10; 'python': 0.10; 'assume': 0.11; 'anyway': 0.11; 'thursday,': 0.13; 'suggest': 0.15; 'apps': 0.15; 'thu,': 0.15; '(so,': 0.16; '-h/--help': 0.16; '2016': 0.16; 'argparse': 0.16; 'email addr:gmail.com]': 0.16; 'etc...': 0.16; 'help?': 0.16; 'interacting': 0.16; 'line),': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:show': 0.16; 'subject:when': 0.16; 'wrote:': 0.16; 'app': 0.16; "shouldn't": 0.18; 'stick': 0.18; 'all,': 0.20; 'cc:addr:python.org': 0.20; 'handles': 0.20; 'cc:2**1': 0.22; 'arguments': 0.22; 'assuming': 0.22; '(or': 0.23; 'help.': 0.23; 'installation': 0.23; 'header:In-Reply-To:1': 0.24; 'command': 0.26; 'linux': 0.26; 'handling': 0.27; 'page.': 0.28; 'arguments,': 0.29; 'dan': 0.29; 'received:192.168.10': 0.29; 'asked': 0.29; "i'd": 0.31; 'implement': 0.32; 'help,': 0.32; 'source': 0.33; 'url:python': 0.33; 'errors,': 0.33; 'limitations': 0.33; 'open': 0.33; 'sent:': 0.35; 'clear': 0.35; 'cc:': 0.35; 'subject:': 0.35; 'but': 0.36; 'should': 0.36; 'url:org': 0.36; 'email addr:python.org': 0.36; 'totally': 0.36; 'url:library': 0.36; 'subject:?': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'agree': 0.37; 'url:rec-html40': 0.37; 'doing': 0.38; 'from:': 0.39; 'received:192': 0.39; 'url:schemas': 0.40; 'some': 0.40; 'url:office': 0.40; 'url:3': 0.60; 'your': 0.60; 'john': 0.61; 'provide': 0.61; 'personally': 0.61; 'show': 0.62; 'back': 0.62; 'python-list': 0.66; 'decided': 0.66; 'email name:python- list': 0.67; 'forth': 0.79; 'received:192.168.15': 0.84; 'approach.': 0.91; 'ultimate': 0.93 |
| DKIM-Signature | v=1; a=rsa-sha256; c=simple/simple; d=f5.com; i=@f5.com; q=dns/txt; s=seattle; t=1461864358; x=1493400358; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=n1cb3wlJ6R2c6lA1d9FDDvR7Ple6I0Y/xGejJ98Jrxw=; b=wOwksOy+qnWJ6bviRn0ET+69AygJd/yoFChooVEOVuCiM5R+79hP2Qfv ZhVSlP+LNeXddQRpHOVBUqJZWULV/9IJInmSqKZY8vahhy/338MT0T28T FbiSWqaWUXFInMv/y0PurXoD5R376zJiillHcgyfm/uiTJULSpSCx4vG/ Q=; |
| X-IronPort-AV | E=Sophos;i="5.24,547,1454976000"; d="scan'208,217";a="216224328" |
| Thread-Topic | What should Python apps do when asked to show help? |
| Thread-Index | AQHRoWw0yo/CeHHw+k+f9dhTV82UOp+fmahCgAAAytCAAHh9gP//jfIQ |
| In-Reply-To | <CACCLA562OqV9Sb534mLFwDm6XFgH9Jp68GUfV_KazT9CVDTt9A@mail.gmail.com> |
| Accept-Language | en-US |
| Content-Language | en-US |
| X-MS-Has-Attach | |
| X-MS-TNEF-Correlator | |
| x-ms-exchange-transport-fromentityheader | Hosted |
| x-originating-ip | [192.168.15.239] |
| X-Content-Filtered-By | Mailman/MimeDel 2.1.22 |
| 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 | <d41d72915163429fa45de4787a28ac4b@seaexchmbx03.olympus.F5Net.com> |
| X-Mailman-Original-References | <57223b76$0$22140$c3e8da3$5496439d@news.astraweb.com> <p6rUy.23471$Sk5.1393@fx45.am4> <118360c7f0a4498e8ed35d6dd15b7ac0@seaexchmbx03.olympus.F5Net.com> <CACCLA562OqV9Sb534mLFwDm6XFgH9Jp68GUfV_KazT9CVDTt9A@mail.gmail.com> |
| Xref | csiph.com comp.lang.python:107811 |
Show key headers only | View raw
Yeah, if I am handling arguments from the command line, I use argparse, if I am doing a cli based app (so, going back and forth in interacting with the command line), I would look at clint (https://github.com/kennethreitz/clint) As many people have said here, don’t reinvent the wheel. Dan From: John Wong [mailto:gokoproject@gmail.com] Sent: Thursday, April 28, 2016 10:06 AM To: Dan Strohl <D.Strohl@F5.com> Cc: alister <alister.ware@ntlworld.com>; python-list@python.org Subject: Re: What should Python apps do when asked to show help? On Thu, Apr 28, 2016 at 1:02 PM, Dan Strohl via Python-list <python-list@python.org<mailto:python-list@python.org>> wrote: I would suggest using argparse https://docs.python.org/3/library/argparse.html as it handles all of that natively... including validating arguments, showing errors, help, etc... however, assuming you don't want to; Totally agree with this approach. Command line should stick with argparse. Personally I'd stick with argparse and not other open source projects which is built on argparse (or optparse, the one you don't want to use, but eh some people decided to do that anyway because of some limitations in argparse). In fact you shouldn't need to implement -h/--help when you use argparse. If a user is going to use the command line, you can almost always assume the user can use -h/--help, or for those familiar with Linux just provide a man page. After all, what you need is a very clear documentation upfront prior to the installation so your users can refer to that for ultimate help.
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