Message201913
Just hang on the Action object that the `add_argument` returned, and change its `help` attribute.
a = parser.add_argument('--foo', help='initial help')
....
a.help = 'new help'
If using a custom parser class and subclass, I'd do something like:
self.changeablearg = self.parser.add_argument...
in the class, and
self.changeablearg.help = 'new help'
in the subclass
You can test the help message with
print parser.format_help() |
|
Date |
User |
Action |
Args |
2013-11-01 16:29:38 | paul.j3 | set | recipients:
+ paul.j3, barry, Arfrever, r.david.murray, ustinov |
2013-11-01 16:29:38 | paul.j3 | set | messageid: <1383323378.22.0.0385563990928.issue19462@psf.upfronthosting.co.za> |
2013-11-01 16:29:38 | paul.j3 | link | issue19462 messages |
2013-11-01 16:29:38 | paul.j3 | create | |
|