Math questions for gameblender Need help

The python forum is moving slow, Please look at this and see if you can help me out.

https://blenderartists.org/forum/viewtopic.php?t=59787

My main question is how can I just grab part of the orientaion or just set part of it. say like i want to set the x axis of orientation but not the z or y.

thx tons