[New-bugs-announce] [issue11695] Improve argparse usage/help customization

Steven Bethard report at bugs.python.org
Sun Mar 27 16:05:45 CEST 2011

New submission from Steven Bethard <steven.bethard at gmail.com>:

I'm going to try to merge several closely related issues here. Basically, people would like better control over the usage message formatting so that you could:

* Put program name and version information at the top of the message
* Customize the "usage:" string (e.g. capitalize it)

One proposal from anatoly techtonik would be to allow a format string so that you could write something like

"""My Program, version 3.5
Usage: %(usage)s

Some description of my program


My epliog text

This should be implemented as a HelpFormatter class, but we might have to expose a little more of the HelpFormatter API (which is currently documented as a no-public API) to make this possible.

Patches welcome. ;-)

components: Library (Lib)
messages: 132322
nosy: bethard
priority: normal
severity: normal
stage: needs patch
status: open
title: Improve argparse usage/help customization
type: feature request
versions: Python 3.3

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list