Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: John Wong Newsgroups: comp.lang.python Subject: Re: What should Python apps do when asked to show help? Date: Thu, 28 Apr 2016 13:05:51 -0400 Lines: 21 Message-ID: References: <57223b76$0$22140$c3e8da3$5496439d@news.astraweb.com> <118360c7f0a4498e8ed35d6dd15b7ac0@seaexchmbx03.olympus.F5Net.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de OkkIWw5kHOatTqjsJxp2PAu3wUJEpoXH6NHWS1JlKKfg== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.05; 'subject:help': 0.07; 'cc:addr:python-list': 0.09; 'email addr:python.org>': 0.10; 'assume': 0.11; 'anyway': 0.11; 'suggest': 0.15; 'thu,': 0.15; '-h/--help': 0.16; '2016': 0.16; 'argparse': 0.16; 'email addr:python.org>': 0.16; 'etc...': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:show': 0.16; 'subject:when': 0.16; 'wrote:': 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; '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; 'message-id:@mail.gmail.com': 0.27; 'page.': 0.28; 'arguments,': 0.29; 'dan': 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; 'received:google.com': 0.35; 'clear': 0.35; 'but': 0.36; 'should': 0.36; 'url:org': 0.36; 'received:209.85': 0.36; 'totally': 0.36; 'url:library': 0.36; 'subject:?': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'agree': 0.37; 'received:209': 0.38; 'some': 0.40; 'url:3': 0.60; 'your': 0.60; 'provide': 0.61; 'personally': 0.61; 'python- list': 0.66; 'decided': 0.66; 'email name:python-list': 0.67; 'received:mail-yw0-f170.google.com': 0.84; 'approach.': 0.91; 'ultimate': 0.93 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:to :cc; bh=ET2cP+F+iMHpnAUI6J0LGlEoASq5wBfckQtUiVzUubw=; b=QZfg5kDH7+96m5UuGAP6DddY4epg81YtugUqVYtzNKTAMu13FPs0h47RXvgjiR2iy2 JiyaZ5VOAg3VbkRgUx+NlQ2C/chKZWlgi/hOZdb0icdpXt7ffpnLu8E2m+zknljXqmco 1VQwq4/plFN7+CpH7NOGNyeWUta9e6/wpKV9KCupVQCffkAiE19TRQ4vK3hJoETjGBpl u+9M4tFTwa+RyG80qmuJQfdWOaL/kycTq+dViLli4JfXNXlXqyeINFWTBb01fVXxrfAB CAXcRPCYASHtAxaEGMtnPfyRGoyXnH9wDWM7VMFt/OpyuT58lADh8bc5gOsvHtu5FRs3 pWGQ== 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:to:cc; bh=ET2cP+F+iMHpnAUI6J0LGlEoASq5wBfckQtUiVzUubw=; b=NjDPJ6B9toQe7dh+mKhxgKgnhQVvXd23M9+0WC35vlo/ilHt/nh45mLqtZsWImzsD7 LkRz6n0gsaO7bO66qS/hMB8e3DFOoVp2iYY8/VMrVWeEJ7CYfu7uf3AQvoWpQglL/n/D tEPzSXbnA/0Wf+FCSbgxn4esR10NO4jY9uwLylldQX9V/B0OC8lRuNNn671IJb+r8eb9 JTQb18v3o+cyoOEV+mBZa3lBmF060u9MeKDI7MymjzeTtymmd24DTpASKUFhwS75ShmV 0LGiJtCpBW8OhL6G21uypTZGiY6/Yw58lYAmuuM01GxjfEFvQpngdBeKGYISjZqWCDfg RlgA== X-Gm-Message-State: AOPr4FWD0hu+NgjzETRmglYMtC/vNRAg20708ixvxg7QtE6ejKboGFtQwbYdVyYuAPkALqmlthGiitx1ayNSYQ== X-Received: by 10.129.98.139 with SMTP id w133mr8801139ywb.222.1461863151809; Thu, 28 Apr 2016 10:05:51 -0700 (PDT) In-Reply-To: <118360c7f0a4498e8ed35d6dd15b7ac0@seaexchmbx03.olympus.F5Net.com> 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <57223b76$0$22140$c3e8da3$5496439d@news.astraweb.com> <118360c7f0a4498e8ed35d6dd15b7ac0@seaexchmbx03.olympus.F5Net.com> Xref: csiph.com comp.lang.python:107808 On Thu, Apr 28, 2016 at 1:02 PM, Dan Strohl via Python-list < 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.