Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #60230 > unrolled thread

argparse feature request

Started byNeal Becker <ndbecker2@gmail.com>
First post2013-11-22 09:56 -0500
Last post2013-11-22 09:56 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  argparse feature request Neal Becker <ndbecker2@gmail.com> - 2013-11-22 09:56 -0500

#60230 — argparse feature request

FromNeal Becker <ndbecker2@gmail.com>
Date2013-11-22 09:56 -0500
Subjectargparse feature request
Message-ID<mailman.3041.1385132210.18130.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web