In this script example, there are two functions, one that gets a worldMatrix of an object and one that decomposes a matrix into translation, rotation, and scale. I think I've annotated it pretty well, but a big thing to note is that if you freeze translation on an object, it won't return the correct world values for the object you input.
Just change the nodeName to your object name and run the script.
You could very easily get an MMatrix using maya.cmds by just doing:
mat = OpenMaya.MMatrix(cmds.getAttr('YourNode.worldMatrix'))
But this will only work with the new API, not the old.