I want to create a script like this
./myscript.py -g parser -a parserapp
and whenever the script is missing one option such as ./myscript.py -g parser, it will print out usage and exit the script
The script should be: ./myscript.py -g parser -a parserapp
So, my question is how can I check if option -a or-g is missing; so, it can print out the usage for the script and exit.
Thank you for your help
argparse