Skip to main content

Python command-line parsing library

Project description

The argparse module provides an easy, declarative interface for creating command line tools, which knows how to:

  • parse the arguments and flags from sys.argv
  • convert arg strings into objects for your program
  • format and print informative help messages
  • and much more…

The argparse module improves on the standard library optparse module in a number of ways including:

  • handling positional arguments
  • supporting sub-commands
  • allowing alternative option prefixes like + and /
  • handling zero-or-more and one-or-more style arguments
  • producing more informative usage messages
  • providing a much simpler interface for custom types and actions

The latest version of argparse, along with API documentation and examples can be found at:

http://code.google.com/p/argparse/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
argparse-1.0.1.win32.msi (163.8 kB) Copy SHA256 hash SHA256 Windows MSI Installer any
argparse-1.0.1.zip (148.4 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page