paul j3 added the comment:
Another approach would be make the 'argparse' argument a 'switch' command, and
act on it after parsing. Roughly what I have in mind is:
parser.add_argument('--verbosity', dest='switch_verbosity,
action='store_true', help=''%config_defaults['verbose'])
..
d0n added the comment:
Thanks for your reply. It seems you quite good understood my use case =) and I
get your point. Also, I just did not mention your (far more easier method) of
accomplishing my goal.
Indeed, where I use that kind of switching I conditionally change the help text
as well. S
R. David Murray added the comment:
I don't understand your use case. As a user I would expect a switch to either
set the value to true or to false, not to toggle it based on some default that
might be changed in a configuration file.
But, your method of accomplishing your goal looks fine to m
New submission from d0n:
Hi,
first of all I want to thank you (bethard) for your great work and efforts on
developing argparse which is a great tool of versatile use in mostly all of my
programs.
I've faced a specific problem while implementing argparse which I have not been
able to fix by t