basic_argparse-1.1
توضیحات
A helper function for setting up an argparse parser.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | basic_argparse-1.1 |
| نام | basic_argparse |
| نسخه کتابخانه | 1.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Matthew Darling |
| ایمیل نویسنده | matthewjdarling@gmail.com |
| آدرس صفحه اصلی | https://github.com/MatthewDarling/basic_argparse |
| آدرس اینترنتی | https://pypi.org/project/basic_argparse/ |
| مجوز | http://opensource.org/licenses/MIT |
Provides some common setup actions for argparse. Import and be happy.
Specifically: init_parser() sets up help, version, and docstring options for
a program. Help and version are easy to get with argparse normally; printing
your docstring is the interesting part. It returns a parser with these basic
options configured. After that, you'll want to your application-specific
customizations.
print_and_exit() is an argparse action for printing an arbitrary string -
specifically, in this case, a program's docstring.
Usage
-----
>>> __version__ = "1.0"
>>> __date__ = "Date of this version's release"
>>> #__doc__ is your docstring, which almost every module should have
>>> import basic_argparse
>>> parser = basic_argparse.init_parser("my awesome program", __version__,
>>> __date__, __doc__)
========
Versions
========
* Version 1.1: Added sample usage to readme
* Version 1.0: Extracted from UNT_to_IPA.py
نحوه نصب
نصب پکیج whl basic_argparse-1.1:
pip install basic_argparse-1.1.whl
نصب پکیج tar.gz basic_argparse-1.1:
pip install basic_argparse-1.1.tar.gz