def parse_input(self):
        """ Validates user input and delegates to the plugin manager """
        if len(sys.argv) < 2:
            print "Usage: kahuna <plugin> <command> [<options>]"
            print "The following plugins are available:\n"
            self.__pluginmanager.help_all()
        elif len(sys.argv) == 2:
            print "Usage: kahuna <plugin> <command> [<options>]"
            # Call the given plugin without command to print
            # the help of the plugin
            return self.__pluginmanager.call(sys.argv[1], None, None)
        else:
            # Call the command in the given plugin with the
            # remaining of the arguments
            return self.__pluginmanager.call(sys.argv[1],
                        sys.argv[2], sys.argv[3:])
dataset/ETHPy150Open nacx/kahuna/kahuna/cli.py/CLI.parse_input/original