Python command-line parsing library
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.
argparse should work on Python >= 2.3, it was tested on:
- 2.3.5, 2.4.4, 2.5.5, 2.6.5 and 2.7
- 3.1, 3.2
Try one of these:
python setup.py install
pip install argparse
putting argparse.py in some directory listed in sys.path should also work
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.
Release history Release notifications
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size argparse-1.2.2-py2.py3-none-any.whl (22.3 kB)||File type Wheel||Python version 2.7||Upload date||Hashes View hashes|
|Filename, size argparse-1.2.2.tar.gz (68.7 kB)||File type Source||Python version None||Upload date||Hashes View hashes|
Hashes for argparse-1.2.2-py2.py3-none-any.whl