This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author chris.jerdonek
Recipients berker.peksag, bethard, chris.jerdonek, jcon, petri.lehtinen
Date 2013-01-10.05:10:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1357794657.26.0.912841362349.issue11695@psf.upfronthosting.co.za>
In-reply-to
Content
+1 to the feature.

A closely-related use case is customizing the message displayed by error(), which is normally the usage string followed by the error message.  I wanted to append instructions on how to invoke --help, and implemented it this way for CPython's regrtest:

http://hg.python.org/cpython/file/6ee721029fd5/Lib/test/regrtest.py#l205

Also take a look at how regrtest formats its usage string as another use case to satisfy:

http://hg.python.org/cpython/file/6ee721029fd5/Lib/test/regrtest.py#l9

It seems like many argparse customizations take the form of "override this method."  Would it make sense for the API to be for customizers to override string-returning methods like make_usage() and make_error() (and that accept a dictionary)?  That may give a bit more control than a format string.
History
Date User Action Args
2013-01-10 05:10:57chris.jerdoneksetrecipients: + chris.jerdonek, bethard, jcon, petri.lehtinen, berker.peksag
2013-01-10 05:10:57chris.jerdoneksetmessageid: <1357794657.26.0.912841362349.issue11695@psf.upfronthosting.co.za>
2013-01-10 05:10:57chris.jerdoneklinkissue11695 messages
2013-01-10 05:10:56chris.jerdonekcreate