Overview
Teaching: 15 min
Exercises: 15 minQuestions
How can I write command-line utilities in Python?
Objectives
Write programs that process command-line arguments in
sys.argvdirectly.Write programs that use the
argparselibrary to process command-line arguments.Write programs that read from standard input and write to standard output.
FIXME
Key Points
Get command-line arguments from
sys.argv.Read from
sys.stdinand write tosys.stdout.Provide a meaningful usage message.