Command-Line Options with argparse

The words typed after a script's name arrive in sys.argv, and the argparse module turns them into a positional argument, options with defaults and flags, checks them, and writes a --help page, so one script works on any folder without editing its code.

By

Updated

Cheat sheet: Command-Line Options with argparse
Category
Python
Level
Journeyman
Tags
argparse, Command-Line Argument (python), flags-and-options, python, sys.argv