A piece of Python code that lists the cameras connected to the computer using v4l2. It also lists the corresponding location of a camera so that it can be used in other Python Programs or it can simply be used to find out whether the camera has been recognized by the system or not.
Instructions for installing the above mentioned package can be found at CheeseShop Tutorial.
The codes have been tested in 64 bit Ubuntu 12.04 Desktop.