-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch from getopt to argparse #21
base: master
Are you sure you want to change the base?
Conversation
15a3927
to
b8c868b
Compare
I'm mostly OK with this. However, one thing that I find I prefer with getopt, is that if you type just
I think this is probably why I went with getopt in the first place. |
getopt is a low-level module for command line handling, and requires manual boilerplate to work. Instead, migrate to argparse, which is more high-level and provides a number of facilities: - a single place to define each option - streamlined help texts - enforcing of mandatory options - enforcing a value as certain type, or in a list of allowed values
Not trying to undermine your feedback on this: how important is that you get the full help text on missing |
I will turn the question around: how important is to switch parsing methods? Both work fine, so why go into the trouble, if the current one offers more flexibility too? |
In the end, it's much easier and less error-prone to use |
Could you possibly look into this, so we can have the help message on error too? |
getopt
is a low-level module for command line handling, and requires manual boilerplate to work. Instead, migrate toargparse
, which is more high-level and provides a number of facilities: