Precise commutative rotation on global X and Y
The angle between a vector and the Z axis and a vector in the right ortho view appears to be such that tan(θ)=y/z.  The angle between a vector and the Z axis in the front ortho view appears to be such that tan(φ)=x/z.

As long as θ and φ aren't going to be π/2 you can pretty easily set z=1 and then y=tan(θ) and x=tan(θ) .  If the π/2 is a possibility you'll want to have code to check for that case and use an alternate formula like tan(π/2-θ) = z/y and similar for φ.

So after following that procedure we have an &lt;x,y,z&gt;, but since you talk about rotations, I assume you have an object with some feature you want to align with this vector.

To accomplish this requires an understanding of quaternions, or you just copy the code from http://web.purplefrog.com/~thoth/blender/python-cookbook/rotate-to-match.html

import bpy

from mathutils import *
from math import *

def compute_rotation(src_vec, dest_vec):

    a = src_vec.normalized()
    b = dest_vec.normalized()

    c = a.cross(b)

    theta = asin(c.magnitude)

    if (c.magnitude&gt;0):
        d = c.normalized()
        st2 = sin(theta/2)
        q = Quaternion( [cos(theta/2), st2*d.x, st2*d.y, st2*d.z] )
    else:
        q = Quaternion( [1,0,0,0] )

    return q

obj = bpy.context.active_object

obj.rotation_quaternion = compute_rotation(Vector([1,1,1]), Vector([1,0,0]))


The src_vec is a vector on the object (it might be the X, Y or Z axis, or some other important feature like an antenna) and dest_vec is the world space vector we want that source vector to be rotated to match.

Another thing to consider is that there are many orientations that are compatible with dest_vec = q*src_vec (just imagine spinning the object around src_vec), but the q calculated by this procedure will have the minimum θ.  

To see how messy things can get, read http://web.purplefrog.com/~thoth/blender/python-cookbook/narratives/animate-random-spin.html