argparser.py 620 Bytes
Newer Older
1 2 3 4 5 6 7
import argparse


def get_arg_parser():
    """ Creates own arguments parser and return it as an object.
    """
    parser = argparse.ArgumentParser()
8 9 10 11 12 13 14 15 16 17
    parser.add_argument('--resource',
                        nargs=1,
                        action='append',
                        required=True,
                        help='resource format: sockname,[connect/bind],sock_type,ip_address,port'
                       )
    parser.add_argument('--disable-ipv6',
                        action='store_true',
                        help='Disable IPv6 mode of ZMQ sockets'
                       )
18
    return parser