Rotational Constraint Help? (getRot/setRot?)

Hey, I want to get started with some simple python scripting and I’m thinking what I need to do is to stop my character from rotating along the local X axis.

I know it’s something like setRot(…) but I have no idea how to set it up and what exactly it is. Can someone help me out, please?

Maybe one of these will help.