Build an argument parser using argparse. Use it when python version is 2.7 or later.

def build_arg_parser():
    """
    Build an argument parser using argparse. Use it when python version is 2.7 or later.

    """
    parser = argparse.ArgumentParser(description="Smatch table calculator -- arguments")
    parser.add_argument("--fl", type=argparse.FileType('r'), help='AMR ID list file')
    parser.add_argument('-f', nargs='+', help='AMR IDs (at least one)')
    parser.add_argument("-p", nargs='*', help="User list (can be none)")
    parser.add_argument("--fd", default=isi_dir_pre, help="AMR File directory. Default=location on isi machine")
    parser.add_argument('-r', type=int, default=4, help='Restart number (Default:4)')
    parser.add_argument('-v', action='store_true', help='Verbose output (Default:False)')
    return parser