Metadata-Version: 2.1 Name: plac Version: 1.1.3 Summary: The smartest command line arguments parser in the world Home-page: https://github.com/micheles/plac Author: Michele Simionato Author-email: michele.simionato@gmail.com License: BSD License Keywords: command line arguments parser Platform: All Classifier: Development Status :: 5 - Production/Stable Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: BSD License Classifier: Natural Language :: English Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 Classifier: Topic :: Software Development :: Libraries Classifier: Topic :: Utilities Installation ------------- If you are lazy, just perform :: $ pip install plac which will install the module on your system. If you prefer to install the full distribution from source, including the documentation, download the tarball_, unpack it and run :: $ python setup.py install in the main directory, possibly as superuser. .. _tarball: http://pypi.python.org/pypi/plac Testing -------- Run :: $ python doc/test_plac.py You will see several apparent errors, but this is right, since the tests are checking for several error conditions. The important thing is that you get at the a line like ``Executed XX tests OK`` Quickstart ---------- Here is a script that does some processing on a database table: .. code-block:: python # updatedb.py from datetime import datetime def main(dsn, table='product', today=datetime.today()): "Do something on the database" print(dsn, table, today) if __name__ == '__main__': import plac; plac.call(main) Here is the help message automatically generated by plac:: $ python updatedb.py -h usage: updatedb.py [-h] dsn [table] [today] Do something on the database positional arguments: dsn table [product] today [2019-07-28 07:18:20.054708] optional arguments: -h, --help show this help message and exit Nevertheless to say, but plac can do a lot more, up to the creation of domain specif languages(!) Documentation -------------- The source code and the documentation are hosted on GitHub: - http://micheles.github.io/plac