Ohh silly me, I forgot to add handler. Now I have put the following code in the .htaccess
AddHandler mod_python .py
PythonHandler mod_python.publisher
PythonDebug On
But still it is showing error 500 page. Is it because I dint reatart apache? If so how do i do it?