June 2019
Beginner to intermediate
770 pages
19h 24m
English
An option to display help is a default feature of argparse. Another special case allows us to change the help option from the defaults to-h or --help. This requires two things. First, we must create the parser with add_help=False. This will turn off the built-in -h, --help feature. After doing that, we will add the argument that we want to use (for example, '-?') with action="help". This will display the help text and exit.
Read now
Unlock full access