On Jul 30, 2019, at 20:49, Andrew Barnert via Python-ideas <python-ideas@python.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…)