On Jul 30, 2019, at 20:49, Andrew Barnert via Python-ideas <firstname.lastname@example.org> wrote:
> There are lots of great third-party libraries that make turning a function into a command-line utility a lot easier than using argparse. I think whenever you want anything more than argv and don’t want argparse, you should probably just use one of those libraries.
That being said, maybe the docs should make that recommendation somewhere?
For example, just as urllib.request points you to requests if you want a higher-level HTTP client, argparse could point you to click if you want something a little more automated and/or fire if you want something dead simple for a quick&dirty script. (Not necessarily those two; those are just the ones I’m most familiar with…)
Or maybe there could be a mention in the tutorial, in the section on command-line arguments, which currently mentions getopt as the simple choice and argparse as the fancy one, but maybe it could instead mention fire, click, and argparse. (The getopt library is only really good when you’re familiar with C getopt and happen to be thinking in exactly those terms—as its own docs say up-top. So I’m not sure it’s a good idea for the tutorial to even mention it…)
Python-ideas mailing list -- email@example.com
To unsubscribe send an email to firstname.lastname@example.org
Message archived at https://email@example.com/message/OEXGSBYWG5JGR4G2ELFVJUGUVWWIN52Q/
Code of Conduct: http://python.org/psf/codeofconduct/