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 bethard
Recipients bethard, eric.araujo, georg.brandl, travistouchdown
Date 2011-02-10.07:20:02
SpamBayes Score 0.0045257355
Marked as misclassified No
Message-id <1297322404.28.0.924833473186.issue9399@psf.upfronthosting.co.za>
In-reply-to
Content
Argparse's wrapping behavior is determined by the formatter_class:

http://docs.python.org/library/argparse.html#formatter-class

Is it reasonable to assume that if you're wrapping your own messages you're already specifying formatter_class=argparse.RawTextHelpFormatter? If so, then perhaps the message should be printed via something like:

    formatter = parser._get_formatter()
    formatter.add_text(self.message)
    file.write(formatter.format_help())

This is what we do in _VersionAction, so I guess it's probably what we should do here.
History
Date User Action Args
2011-02-10 07:20:04bethardsetrecipients: + bethard, georg.brandl, eric.araujo, travistouchdown
2011-02-10 07:20:04bethardsetmessageid: <1297322404.28.0.924833473186.issue9399@psf.upfronthosting.co.za>
2011-02-10 07:20:02bethardlinkissue9399 messages
2011-02-10 07:20:02bethardcreate