OpenCVTexture, webcam, projectTexture example

Is the code fragment working ?

print "Choose a webcam"
for o in range(WebcamVideo.getNumOptions()):
  option = WebcamVideo.getOption(o)
  print "Option %d, '%s' at %f fps with size %dx%d" % (o, option.getName(), option.getFps(), option.getXSize(), option.getYSize())

o = int(raw_input("option>"))
option = WebcamVideo.getOption(o)
cursor = option.open()

getNumOptions() return 0. Do I need to configure it ?