argparser.py 395 Bytes
Newer Older
Robin Obůrka's avatar
Robin Obůrka committed
1 2 3 4 5 6 7 8
import argparse


def get_arg_parser():
    """ Creates own arguments parser and return it as an object.
    """
    parser = argparse.ArgumentParser()
    parser.add_argument('--resource', nargs=1, action='append', required=True,
9
        help='resource format: sockname,[connect/bind],sock_type,ip_address,port')
Robin Obůrka's avatar
Robin Obůrka committed
10 11
    parser.add_argument('--disable-ipv6', action='store_true')
    return parser