argparser = argparse.ArgumentParser(description='Reboot an AWS instance.', add_help = False)
argparser.add_argument('-v', dest='verbose', action='store_true', default = False,
help='be more verbose')
argparser.add_argument('-c', dest='conf', action='store', default=None,
help='define config file ')
argparser.add_argument('-a', dest='account', action='store', default=None,
help='set account')
argparser.add_argument('cmd', action='store')
argparser.add_argument('name', action='store')
But I'm confused by the apparent lack of support for simply passing such arguments to a single function such as main(). The dispatch mechanism seems to bend over backwards to make sure the program is being called with a program command options style. For simpler programs where the program itself IS the command program options , I'm having to perform an unnatural act to get argh working: