argparse
The standard library module for reading options and arguments given on the command line, with automatic --help text.
In more detail
You declare the arguments a program accepts and argparse parses sys.argv, converts types and reports usage errors. It also generates a --help message from the arguments you declare.
Related terms
- sys module — The standard library module through which a program asks the running interpreter about itself.
- entry point — A declared command name that, when your package is installed, becomes a real command which calls a chosen function.
Taught in
- A Standard Library Tour — Hands-on Python: Complete Video Course & Book
- Shipping: scripts, entry points and git — Hands-on Python: Complete Video Course & Book
- When awk Runs Out: Python Data Types, Modules And Virtual Environments For Admins — CompTIA Linux+ (XK0-006) Exam Prep