Author paul.j3
Recipients Arfrever, barry, paul.j3, r.david.murray, ustinov
Date 2013-11-01.16:29:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1383323378.22.0.0385563990928.issue19462@psf.upfronthosting.co.za>
In-reply-to
Content
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()
History
Date User Action Args
2013-11-01 16:29:38paul.j3setrecipients: + paul.j3, barry, Arfrever, r.david.murray, ustinov
2013-11-01 16:29:38paul.j3setmessageid: <1383323378.22.0.0385563990928.issue19462@psf.upfronthosting.co.za>
2013-11-01 16:29:38paul.j3linkissue19462 messages
2013-11-01 16:29:38paul.j3create