Parse arguments and run the funcs.

        :param command: name of command to run. default argv[0]
        :param argv: argument vector to be parsed.
            sys.argv[1:] is used if not provided.
        :param help: Set to False to disable automatic
            help on -h or --help options.
        :param exit: Set to False to return result instead of exiting.

def run(self, command=None, argv=None, help=True, exit=True):
        """
        Parse arguments and run the funcs.

        :param command: name of command to run. default argv[0]
        :param argv: argument vector to be parsed.
            sys.argv[1:] is used if not provided.
        :param help: Set to False to disable automatic
            help on -h or --help options.
        :param exit: Set to False to return result instead of exiting.
        """

        result = 0
        if argv is None:
            argv = sys.argv[1:]

        args = self.parse(self.doc, argv=argv, help=help, first=True)

        if command is None and len(sys.argv) > 1:
            cmd = argv[0]
        else:
            cmd = args.get(command, None)

        if cmd in self._commands:
            cmd = self._commands[cmd]
            args = self.parse(cmd.doc, argv=argv, help=help)
            args = self.process_args(args)
            result = cmd(**args)

        if exit:
            sys.exit(result)
        return result