You need to use the API to get the object-space bounding box and then transform the min/max by the objects transformation matrix:
import maya.OpenMaya as OM
def Run():
# Get the current selection.
# The first object in the selection is used, and is assumed
# to be a transform node with a single shape directly below it.
selectionList = OM.MSelectionList()
OM.MGlobal.getActiveSelectionList(selectionList)
selectedPath = OM.MDagPath()
selectionList.getDagPath(0, selectedPath)
# Get the transformation matrix of the selected object.
transform = OM.MFnTransform(selectedPath)
m = transform.transformationMatrix()
# Get the shape directly below the selected transform.
selectedPath.extendToShape()
fnMesh = OM.MFnMesh(selectedPath)
bounds = fnMesh.boundingBox()
center = bounds.center()
min = bounds.min()
max = bounds.max()
print('Center: (%f, %f, %f)' % (center.x, center.y, center.z))
print('Min: (%f, %f %f)' % (min.x, min.y, min.z))
print('Max: (%f, %f %f)' % (max.x, max.y, max.z))
print('')
# Transform the bounding box min/max by the objects transformation matrix.
minTransform = min * m
maxTransform = max * m
print('Transformed Min: (%f, %f %f)' % (minTransform.x, minTransform.y, minTransform.z))
print('Transformed Max: (%f, %f %f)' % (maxTransform.x, maxTransform.y, maxTransform.z))
Run()