Activate actuator (Action and Motion) from Python

I just cannot figure out how to activate an aaction/motion actuator from inside python script for a KX_GameObject.

Here’s my blend file : https://www.dropbox.com/s/2guepbfyq6h4tsm/dragon.blend?dl=0

I want to apply the action of moving forward ( which is defined in actuators) from the python script. I tried many things and none seem to work.
The latest gives the error of "failed to load the action : "

Please help

I don’t quite get what you are asking, because when I downloaded the file and hit the play button, it moved forward. That said, the way that I would add actuators via code would be:


import bpy
obj = bpy.context.object
sensors = obj.game.sensors
controllers = obj.game.controllers
actuators = obj.game.actuators

bpy.ops.logic.sensor_add(type='KEYBOARD', name='Forward', object=obj.name)
bpy.ops.logic.controller_add(type='LOGIC_AND', object=obj.name)
bpy.ops.logic.actuator_add(type='MOTION', object=obj.name)

sensor = sensors[-1]
controller = controllers[-1]
actuator = actuators[-1]

sensor.link(controller)
sensor.use_pulse_true_level = True
sensor.key = 'W'
actuator.link(controller)
actuator.offset_location[1] = 0.08

Note that this particular line:

actuator.offset_location[1] = 0.08


Can control the x, y, or z axis.  [0] for x, [1] for y and [2] for z.

I spent a few days figuring this all out, I could not find anything on the web that showed how to do it.