the code you're refering to is using the outdated c api, and the old cv wrapper. please don't use that !
prefer the newer cv2 api (together with numpy), the old one will go away in near future.
https://github.com/Itseez/opencv/blob/2.4/samples/python2/facedetect.py