Select [View]-[Panels]-[Python console] in menu bar to display Python console].
If you enter following commands, each value will be displayed in Python console.
Note: If shape's ShapeType is "Compound", a gravity center cannot be calculated with the method previously described. To check shape's ShapeType, execute following command.
If shape's ShapeType is "Compound", you can use Shape.solids to get each solid's gravity center.