I don't know any pure python implementations. But maybe the opencv bindings works for you:
import cv
cvcapture = cv.CaptureFromFile("movie.mpg")
cv.GetCaptureProperty(cvcapture,cv.CV_CAP_PROP_FRAME_COUNT)
Otherwise, maye you can use pyffmpeg. Beware: It is my experience that the frame count is often not very accurate. Opencv 2.6 works very well, but ealier versions gives sometimes just garbage.
Edit: Ah, sorry my mistake: This gives you the frame count only. For the duration: Multiply this with the frame rate:
cv.GetCaptureProperty(cvcapture,cv.CV_CAP_PROP_FPS)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…