On Thu, Sep 16, 2021 at 5:28 AM <rleon...@uoregon.edu> wrote: > > I would love to make the 'subcommands' functionality provided in argparse > more user-friendly. > I think I have a worthwhile feature request to share: > > * Be able to add multiple subcommands to an ArgumentParser, without needing > to track the 'action_object' > > I've outlined an motivating example below, and shared an implementation of > this feature that I've started using in one of my projects. >
A reasonable idea, but what I'd recommend is building a wrapper around argparse that does what you want. One good example is clize: https://pypi.org/project/clize/ ChrisA _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/LAYZXH44ED73LI6KGHFT3KYBQSRGOXBH/ Code of Conduct: http://python.org/psf/codeofconduct/