3 ms·
if it's a simple basic script, i wouldn't even go through the pain of using argparse. i would just manually check sys.argv.
by blondin 7y ago
if it's a simple basic script, i wouldn't even go through the pain of using argparse. i would just manually check sys.argv.
- wutbrodo 7y agoI've generally found argparse to be worth it the minute that you need anything other than two args, whose usage implies an intuitive ordering (eg with mv)
- kissgyorgy 7y agoYou ALWAYS need a CLI framework at least for generating help automatically, otherwise I hate you when I want to use your frugal tool and I have to look into it to find out how it works.
- ageofwant 7y agoIn which case you would be using click. If I have any expectation that someone else is going to use my script I give it a REAME.md, a requirements.txt, a setup.py and I use click. It literally takes about 30's to do and you now have a cli interface indistinguishable from any other cli on your system.