action nla set action to armature help?

There seem nothing that could help the script able to set an action to the armature from different actions.

I did a round about way but I end up breaking up the other objects that has the animations in their actions. Trying to deal with the exporting a object with the animation. There was something like this before in the 2.49b.

Here the code. Blender 2.50

import bpy
import mathutils
import operator

class VIEW3D_PT_ASLT(bpy.types.Panel):
    bl_space_type = "VIEW_3D"
    bl_region_type = "TOOLS"
    bl_label = "ASLT"
    def poll(self, context):
        return context.active_object
    def draw(self, context):
        layout = self.layout
        #layout.label(text="Unreal Tools")
        rd = context.scene

class OBJECT_OT_BASLT(bpy.types.Operator):
    global exportmessage
    bl_idname = "OBJECT_OT_BASLT"
    bl_label = "BASLT"
    __doc__ = ""
    def invoke(self, context, event):
        print("Init Export Script:")
        for action in of the actions
            for obj in current object in the scene
                if == "Armature":#if Amature name is found execute
                    print("Current:",( current action name from armature object.
                    obj.animation_data.action = action #set armature animation to action current loop in the list
                    print("set action:",( what we set for the action


def register():
def unregister():

if __name__ == "__main__":

It part of the code I tested. Not sure there a correctly way to set the action in the scene when it ready export. Any ideas?