This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author chris.jerdonek
Recipients bethard, chris.jerdonek
Date 2013-02-14.07:01:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1360825267.06.0.240295052102.issue17204@psf.upfronthosting.co.za>
In-reply-to
Content
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().
History
Date User Action Args
2013-02-14 07:01:07chris.jerdoneksetrecipients: + chris.jerdonek, bethard
2013-02-14 07:01:07chris.jerdoneksetmessageid: <1360825267.06.0.240295052102.issue17204@psf.upfronthosting.co.za>
2013-02-14 07:01:07chris.jerdoneklinkissue17204 messages
2013-02-14 07:01:06chris.jerdonekcreate