I\'m writing a script which has 2 arguments which are mutually exclusive, and an option that only makes sense with one of those arguments. I\'m trying to set up argparse to fail
Add the usage argument when creating the parser:
usage
usage = "usage: whichboom [-h] [-s | [-h] [-s]] host" description = "Lookup servers by ip address from host file" parser = argparse.ArgumentParser(description=description, usage=usage)
Source: http://docs.python.org/dev/library/argparse.html#usage