I am creating a command line tool in python, and I'm using argparse to parse my input.
I want to use '-h' as an action, but that is already automatically assigned to --help. How can I override this and have an -h action?
I am creating a command line tool in python, and I'm using argparse to parse my input.
I want to use '-h' as an action, but that is already automatically assigned to --help. How can I override this and have an -h action?
parser = argparse.ArgumentParser(add_help=False)
Thanks for asking, because I had the same problem the other day and only bothered checking the documentation now.