def action(self, mode, operator):
        try:
            action = self.actionMaps[mode][operator]
            moduleName, className = action.rsplit(".", 1)
            Action = getattr(
                importlib.import_module(moduleName),
                className)
            action = Action()
        except __HOLE__:
            debug("Key Error: %s %s" % (mode, operator))
            self.dispatcher.reset()
            action = DummyAction()
        action.dispatcher = self.dispatcher
        action.command = self.dispatcher.currentCommand
        action.windowManager = self.windowManager
        action.actionManager = self
        action.registerManager = self.registerManager
        action.globalVariables = self.globalVariables
        if mode == "command":
            action.window = self.windowManager.commandLine
            action.window.buffer.insert(Position(1,1), "\n")
            action.window.cursor.move(Position(1,0))
        else:
            action.window = self.windowManager.window
        action.buffer = action.window.buffer
        action.cursor = action.window.cursor
        action.motions = action.window.motions
        return action
dataset/ETHPy150Open elmar-hinz/Python.Vii/vii/ActionManager.py/ActionManager.action