measure

hi, how can I measure a 3D object, and get the height , width and volume of this object with a python script code ?
thx