Set axis for spin from custom orientation
From m = bpy.context.scene.orientations[0].matrix

Transformed X, Y and Z axis (in world coordinates) are:

x = m * Vector( (1, 0, 0) )
Y = m * Vector( (0, 1, 0) )
z = m * Vector( (0, 0, 1) )


If you need it in an object local coordinates:

x_local = obj.matrix_world.inverted() * x
y_local = obj.matrix_world.inverted() * y
z_local = obj.matrix_world.inverted() * z