def parse_args():
    """Parse command-line arguments; fill in global variable 'args'."""
    global args
    parser = argparse.ArgumentParser()
    parser.add_argument('-e', '--exact',   help='Print exact matches only.',            action='store_true', dest='exactMatchOnly' )
    parser.add_argument('-f', '--first',   help='Print just the first match.',          action='store_true', dest='firstMatchOnly' )
    parser.add_argument('-v', '--version', help='Print version and exit successfully.', action='version', version=VERSION)
    parser.add_argument('COMMANDS', nargs=argparse.REMAINDER)
    args = parser.parse_args()
    return args
Parse command-line arguments; fill in global variable 'args'.
recipes/Python/578642_Which_for_Windows/recipe-578642.py