Just delete the extra white space characters(if there is any) before def handler(request) in test.py and see. It is very much required to be careful about indentation in python. Also, your handler is being shown as &quot;test&quot;. In apache htttpd.conf file try setting SetHandler&nbsp; as python-program and then set the python path as something like PYTHONPATH &quot;[&#39;C:\\\\Python25\\\\Lib\\\\site-packages\\\\django\\\\bin&#39;] + sys.path&quot;.<br>
<br>Thanks and regards,<br>Bharath Keshav.<br><br><div class="gmail_quote">

On Wed, May 28, 2008 at 1:16 PM, arindam majumdar &lt;<a href="mailto:ari.majumdar84@gmail.com" target="_blank">ari.majumdar84@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


Hi Guys,<br>I am pretty new to python and was trying to execute my first python script which the same old hello world.<br>I am running fedora core 8, apache 2.2.8 and python 3.1.<br><br><pre>MOD_PYTHON ERROR<br><br>ProcessId:      9571<br>
<br><br><br>Interpreter:    &#39;localhost.localdomain&#39;<br><br>ServerName:     &#39;localhost.localdomain&#39;<br>DocumentRoot:   &#39;/var/www/html&#39;<br><br>URI:            &#39;/mptest.py&#39;<br>Location:       None<br>
<br>Directory:      &#39;/var/www/html/&#39;<br><br><br>Filename:       &#39;/var/www/html/mptest.py&#39;<br>PathInfo:       &#39;&#39;<br><br>Phase:          &#39;PythonHandler&#39;<br>Handler:        &#39;test&#39;<br><br>
Traceback (most recent call last):<br><br><br>  File &quot;/usr/lib/python2.5/site-packages/mod_python/importer.py&quot;, line 1537, in HandlerDispatch<br><br><br>    default=default_handler, arg=req, silent=hlist.silent)<br>
<br>  File &quot;/usr/lib/python2.5/site-packages/mod_python/importer.py&quot;, line 1202, in _process_target<br><br>    module = import_module(module_name, path=path)<br><br><br><br>  File &quot;/usr/lib/python2.5/site-packages/mod_python/importer.py&quot;, line 296, in import_module<br>
    log, import_path)<br><br>  File &quot;/usr/lib/python2.5/site-packages/mod_python/importer.py&quot;, line 680, in import_module<br><br><br><br>    execfile(file, module.__dict__)<br><br>  File &quot;/var/www/html/test.py&quot;, line 3<br>
<br>    def handler(req):<br><br>   ^<br><br>IndentationError: unexpected indent<br><br><br>MODULE CACHE DETAILS<br><br><br>Accessed:       Wed May 28 12:13:56 2008<br><br><br>Generation:     0<br><br>_mp_a0c997aa0dc877af47e755b6b2a27f16 {<br>
  FileName:     &#39;/var/www/html/test.py&#39;<br>  Instance:     1 [IMPORT]<br>  Generation:   0 [ERROR]<br><br>  Modified:     Wed May 28 11:58:12 2008<br><br><br>}<br></pre>Any help would be great.<br><br>Cheers,<br>Arindam MAjumdar<br clear="all">
<font color="#888888"><br>-- <br>I would have changed myself, but God didn&#39;t release the source code.
</font><br>_______________________________________________<br>
BangPypers mailing list<br>
<a href="mailto:BangPypers@python.org" target="_blank">BangPypers@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/bangpypers" target="_blank">http://mail.python.org/mailman/listinfo/bangpypers</a><br>
<br></blockquote></div><br>