Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.012 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'python3': 0.07; 'see.': 0.07; 'exit': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'arguments:': 0.16; 'optional': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:argparse': 0.16; 'alpha': 0.16; 'subject:request': 0.19; 'header:User-Agent:1': 0.23; 'header:X-Complaints-To:1': 0.27; 'values.': 0.31; "i'd": 0.34; 'add': 0.35; 'example,': 0.37; 'skip:[ 10': 0.38; 'to:addr :python-list': 0.38; 'skip:- 10': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'range': 0.61; 'show': 0.63; 'default': 0.69; 'training': 0.77; '<<<': 0.84; 'programs:': 0.84; 'received:139': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Neal Becker Subject: argparse feature request Date: Fri, 22 Nov 2013 09:56:37 -0500 Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Gmane-NNTP-Posting-Host: exa2-in-fw-01-epn.hns.com User-Agent: KNode/4.11.3 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 36 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1385132210 news.xs4all.nl 15900 [2001:888:2000:d::a6]:58621 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:60230 I use arparse all the time and find it serves my needs well. One thing I'd like to see. In the help message, I'd like to automatically add the default values. For example, here's one of my programs: python3 test_freq3.py --help usage: test_freq3.py [-h] [--size SIZE] [--esnodB ESNODB] [--tau TAU] [--trials TRIALS] [--training TRAINING] [--sps SPS] [--si SI] [--alpha ALPHA] [--range RANGE] [--dfunc {gradient,delay}] [--mod {gaussian,qpsk,8psk,16apsk,32apsk,32dlr,64apsk,256apsk}] [--sym-freq-err SYM_FREQ_ERR] [--calibrate [CALIBRATE]] optional arguments: -h, --help show this help message and exit --size SIZE --esnodB ESNODB, -e ESNODB --tau TAU, -t TAU --trials TRIALS --training TRAINING --sps SPS --si SI --alpha ALPHA --range RANGE --dfunc {gradient,delay} --mod {gaussian,qpsk,8psk,16apsk,32apsk,32dlr,64apsk,256apsk} --sym-freq-err SYM_FREQ_ERR --calibrate [CALIBRATE], --with-calibrate [CALIBRATE], --enable-calibrate [CALIBRATE], --no-calibrate [CALIBRATE], --without-calibrate [CALIBRATE], -- disable-calibrate [CALIBRATE] What I'd like to see is: --size SIZE [2000] <<< the default value is displayed