sl = om.MSelectionList()
sl.add( mesh )
path = om.MDagPath()
sl.getDagPath( 0, path )
if (path.hasFn(om.MFn.kTransform)) :
dag = om.MFnDagNode( path )
bbox = dag.boundingBox()
'mesh' is a name of my objects transform node.
i get two points defining bounding box. i suppose i have to get some matrix and transform those points - unfortunately i have no idea how. if someone could share a piece of code, i'd be very grateful.