About Course
Turn a Python script into a proper command-line tool with argparse, part of the standard library. Learn positional and optional arguments, types, defaults, choices and flags, automatic help, error handling, mutually exclusive options and subcommands, with a complete worked example.
Tutwoo is an independent learning provider. This course is written from the official documentation listed in the sources, which can change, so always check the current documentation for the version you use. It is not endorsed by any of the organisations listed and is not an accredited qualification.
© 2026 Tutwoo UK Limited. This course was created in-house by Tutwoo and is our original work. It is for your own learning only: please do not copy, share, record or resell it.
Course Content
Course Lessons
-
Your first parser
-
Positional arguments, options and flags
-
Validating input: choices, nargs and errors
-
Groups, subcommands and a complete example