There are multiple argument parsers available, I will mention mine favourite ones:
argparse
- built into Python till 2.7, older versions can install it as a package from PyPiplac
- package from pypi, based onargparse
but much simpler to use.docopt
- excellent solution based on writing docstring for the command first and parsing it as specification for the command - this results in shortest and very readable code you can imagine. Must be installed from pypi
By "install from pypi" I mean it can be found at http://pypi.python.org and can be installed by pip
command. First thing to do after installing Python is to be sure, pip command is installed. It comes with Python 3.4, for older versions of Python see http://www.pip-installer.org/en/latest/installing.html#install-pip
Personally, I do not use argparse any more, it talks too much and is not very readable.
In any case, grab some tutorials and test them first, this will help you to start quickly:
For plac
see: https://github.com/kennethreitz-archive/plac, there is a link to pdf and html documentation, plus github provides set of nice examples.
For docopt
see great introduction at http://docopt.org/ and samples at https://github.com/docopt/docopt/tree/master/examples