Skip to main content

Python command-line parsing library

Project description

The argparse module makes it easy to write user friendly command line interfaces.

The program defines what arguments it requires, and argparse will figure out how to parse those out of sys.argv. The argparse module also automatically generates help and usage messages and issues errors when users give the program invalid arguments.

As of Python >= 2.7 and >= 3.2, the argparse module is maintained within the Python standard library. For users who still need to support Python < 2.7 or < 3.2, it is also provided as a separate package, which tries to stay compatible with the module in the standard library, but also supports older Python versions.

argparse is licensed under the Python license, for details see LICENSE.txt.

Compatibility

argparse should work on Python >= 2.3, it was tested on:

  • 2.3, 2.4, 2.5, 2.6 and 2.7

  • 3.1, 3.2, 3.3, 3.4

Installation

Try one of these:

python setup.py install

easy_install argparse

pip install argparse

putting argparse.py in some directory listed in sys.path should also work

Bugs

If you find a bug, please try to reproduce it with python 2.7.

If it happens there also, please file a bug in the python.org issue tracker. If it does not happen in 2.7, file a bug in the argparse package issue tracker.

Project details


Download files

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

Source Distribution

argparse-1.3.0.tar.gz (93.2 kB view details)

Uploaded Source

Built Distribution

argparse-1.3.0-py2.py3-none-any.whl (22.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file argparse-1.3.0.tar.gz.

File metadata

  • Download URL: argparse-1.3.0.tar.gz
  • Upload date:
  • Size: 93.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for argparse-1.3.0.tar.gz
Algorithm Hash digest
SHA256 b3a79a23d37b5a02faa550b92cbbbebeb4aa1d77e649c3eb39c19abf5262da04
MD5 9bcf7f612190885c8c85e30ba41db3c7
BLAKE2b-256 b38d109a9a60ca878cdd694eb2953cdcc6e197e217b61a0cc56e89c1dff2159b

See more details on using hashes here.

File details

Details for the file argparse-1.3.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for argparse-1.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d01978e9a8c51ea7b34ec71f3fced1326437cd366b9c2e19265ace050924e0e2
MD5 c89395a1a43b61ca6a116aed5e3b1d59
BLAKE2b-256 ccb35c40541f259ab09c1e36dbc5e62b05291ca47b0df5e3a84b1e01c7f2bf10

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page