3 ms·
I use argparse daily. One CLI script I have uses over 1000 LOC to define all the commands/arguments/flags. Am I doing something wrong? Is there a way to uncl
by nvusuvu 6y ago
I use argparse daily. One CLI script I have uses over 1000 LOC to define all the commands/arguments/flags. Am I doing something wrong? Is there a way to unclutter my CLI script but still have the commands? Import them from another file, perhaps?
- gen220 6y agoAs another commenter here mentioned, you might want to consider fire [1], depending on the complexity of your argparse-usage it might check 90% of your boxes for you. [1]: https://github.com/google/python-fire https://github.com/google/python-fire
- nvusuvu 6y agoThanks, that looks pretty slick!