Message153514
| Author |
ncoghlan |
| Recipients |
bethard, ncoghlan |
| Date |
2012年02月16日.23:46:44 |
| SpamBayes Score |
3.865769e-05 |
| Marked as misclassified |
No |
| Message-id |
<1329436005.81.0.273577688528.issue14037@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年02月16日 23:46:45 | ncoghlan | set | recipients:
+ ncoghlan, bethard |
| 2012年02月16日 23:46:45 | ncoghlan | set | messageid: <1329436005.81.0.273577688528.issue14037@psf.upfronthosting.co.za> |
| 2012年02月16日 23:46:45 | ncoghlan | link | issue14037 messages |
| 2012年02月16日 23:46:45 | ncoghlan | create |
|