argfarce-1.1
توضیحات
Declarative wrapper for argparse
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | argfarce-1.1 |
| نام | argfarce |
| نسخه کتابخانه | 1.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Ken Kinder |
| ایمیل نویسنده | kkinder@gmail.com |
| آدرس صفحه اصلی | http://kkinder.com/argfarce |
| آدرس اینترنتی | https://pypi.org/project/argfarce/ |
| مجوز | UNKNOWN |
Argfarce
--------
Argfarce makes it easy to declare argparse structures. Consider this example:
>>> class PersonalInfoParser(ArgumentParser):
... class Meta:
... prog = 'person.py'
...
... name = Argument('-n', help="Cheese to use on your sandwich", required=False)
... profession = Argument('-p', '--profession', choices=('developer', 'programmer', 'software engineer'), help="These are all pretty much the same", required=False)
... comments = Argument(nargs='*')
...
>>> parser = PersonalInfoParser()
>>> parser.parse_args('-p programmer -n Ken foo bar spam'.split())
>>> print parser.name
Ken
>>> print parser.profession
programmer
>>> print parser.comments
['foo', 'bar', 'spam']
This software is not yet compatible with Python 3.
نحوه نصب
نصب پکیج whl argfarce-1.1:
pip install argfarce-1.1.whl
نصب پکیج tar.gz argfarce-1.1:
pip install argfarce-1.1.tar.gz