isso/wynaut/__init__.py

21 lines
537 B
Python
Raw Normal View History

2013-12-12 11:24:37 +00:00
# -*- encoding: utf-8 -*-
import pkg_resources
dist = pkg_resources.get_distribution("isso")
import os
from argparse import ArgumentParser, SUPPRESS
2013-12-12 11:24:37 +00:00
def get_parser(desc):
2013-12-12 11:24:37 +00:00
parser = ArgumentParser(description=desc)
2013-12-12 11:24:37 +00:00
parser.add_argument('--version', action='version', version='%(prog)s' + dist.version,
help=SUPPRESS)
2013-12-12 11:24:37 +00:00
parser.add_argument('-c', dest="conf", default=os.environ.get("ISSO_SETTINGS"),
metavar="/etc/isso.conf", help="set configuration file")
return parser