Steven Bethard <steven.beth...@gmail.com> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9399>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to