Skip to content

Glossary: Python Beyond the Basics

argparse

Also written: ArgumentParser, add_argument, subparsers

A standard-library module that reads command-line arguments, checks them, and writes help text and error messages automatically. The expense tracker uses it to define its `add`, `list` and `summary` commands.

Where the book teaches it

Related terms

command-line argumentsparserpositional argumentoption