A help message is command-line documentation that explains a program’s invocation syntax and available arguments or options. Programs commonly display it for -h or --help, helping users change behavior without editing source code. section 1.7
A useful help message typically shows:
- A usage line describing required positional arguments and optional flags. section 1.7
- A short program description and explanations for each argument or option. section 16.1 section 17.1
- Validation feedback when required arguments are missing or files cannot be opened. section 1.7 section 7.1
A generated help message
With argparse, defining a required name argument and a description lets hello.py respond to ./hello.py -h with a usage line, the “Say hello” description, the name argument, and the standard -h, --help option. section 1.7
$ ./hello.py -h usage: hello.py [-h] name Say hello : name Name to greet #1 : -h, --help show this help message and exit
Inspect the complete terminal output for a help message, including usage syntax, a positional argument, and the standard help flag. section 1.7

