15 Sep
2021
15 Sep
'21
1:08 p.m.
On Thu, Sep 16, 2021 at 5:28 AM
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