Get current action

How can I get with python the current action name ( the same that is selected in the action editor)?

I get the current scene, but I don’t know how get the current action.

Thanks,
Antonio

there’s not a single current action, do you want the active object’s action name if it has an action?

this returns either the action name or an empty string:

ob = bpy.context.object
action_name = (ob.animation_data.action.name
    if ob.animation_data is not None and
    ob.animation_data.action is not None
    else "")

Yes, you are right. I was thinking to get the default action, but if you have several objects (two rigs for example) you will have two actions, so I must think to use your solution.

Thanks CoDEmanX, you are helping me a lot!