def cycle(self, argv):
        argv.pop(0) # eat name
        rangetoken = argv.pop(0)
        argv = self._expand_aliases(argv)
        meth = getattr(self, argv[0])
        for sloc, arg in enumerate(argv):
            if arg.find("%") >= 0:
                break
        else:
            self._ui.error("No %% substitution found.")
            return
        try:
            therange = self._parse_range(rangetoken)
        except ValueError, err:
            raise CLISyntaxError, err
        for i in therange:
            newargs = argv[:]
            newargs[sloc] = newargs[sloc].replace("%", str(i))
            self._ui.Print(" ".join(newargs))
            apply(meth, (newargs,))
cycle <range> <command> [<arg>...]
dataset/ETHPy150Open kdart/pycopia/fepy/pycopia/fepy/CLI.py/BaseCommands.cycle