Python as a Second Language

Command-Line Programming

Overview

Teaching: 15 min
Exercises: 15 min
Questions
  • How can I write command-line utilities in Python?

Objectives
  • Write programs that process command-line arguments in sys.argv directly.

  • Write programs that use the argparse library to process command-line arguments.

  • Write programs that read from standard input and write to standard output.

FIXME

Exercises

Key Points