New submission from Nick Coghlan <ncogh...@gmail.com>:

I've just started using the argparse subparser feature, and it's very nice. 
However, I'd love to be able to group the different subparser commands into 
different sections the way I can group ordinary arguments with 
add_argument_group().

Initially I thought just calling "parser.add_subparsers()" multiple times with 
different "title" values would work, but argparse doesn't currently like that - 
it errors out with "cannot have multiple subparser arguments".

I propose that instead of treating this case as an error, argparse should treat 
it as a way for defining subparser groups - there would still only be a single 
subparser argument accepted, but the individual commands would appear grouped 
appropriately in the help output.

----------
components: Library (Lib)
messages: 153514
nosy: bethard, ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: Allow grouping of argparse subparser commands in help output
type: enhancement
versions: Python 3.3

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

Reply via email to