Message182081
Currently, argparser's subparsers.add_parser() method (for adding sub-commands) takes the following input:
"This object has a single method, add_parser(), which takes a command name and any ArgumentParser constructor arguments, and returns an ArgumentParser object that can be modified as usual."
(from http://docs.python.org/dev/library/argparse.html#argparse.ArgumentParser.add_subparsers )
It would be nice if one could also pass an ArgumentParser object to add_parser(). This would allow the composition of parsers. For example, if a library exposed an ArgumentParser command-line API, one could expose that library's commands as a sub-command of the parent project's command-line API using add_parser(). |
|
Date |
User |
Action |
Args |
2013-02-14 07:01:07 | chris.jerdonek | set | recipients:
+ chris.jerdonek, bethard |
2013-02-14 07:01:07 | chris.jerdonek | set | messageid: <1360825267.06.0.240295052102.issue17204@psf.upfronthosting.co.za> |
2013-02-14 07:01:07 | chris.jerdonek | link | issue17204 messages |
2013-02-14 07:01:06 | chris.jerdonek | create | |
|