I want to write an application to video capture from web-cams in linux. Is there a python library to do that?
You should look at Gstreamer and its Python bindings. Here http://pygstdocs.berlios.de/pygst-tutorial/webcam-viewer.html is some sample code to display video from a webcam. To record the video you would have to change the pipeline definition from autovideosink
to an encoder and filesink.