SO spent a better half of the day and evening and night ...tried so
many times :(
and same.... along with Indentation error

Thanks
Nitin


500 Internal Server Error

[Fri Oct 22 23:35:04 2010] [error] [client 192.168.1.9] mod_wsgi
(pid=4210, process='healthcare.in',
application='www.healthcare.in|/index.py'): Failed to parse WSGI
script file '/home/dev/wsgi-scripts/index.py'.
[Fri Oct 22 23:35:04 2010] [error] [client 192.168.1.9] mod_wsgi
(pid=4210): Exception occurred processing WSGI script
'/home/dev/wsgi-scripts/index.py'.
[Fri Oct 22 23:35:04 2010] [error] [client 192.168.1.9]   File
"/home/dev/wsgi-scripts/index.py", line 31
[Fri Oct 22 23:35:04 2010] [error] [client 192.168.1.9]      def
application(environ, start_response):
[Fri Oct 22 23:35:04 2010] [error] [client 192.168.1.9]
                              ^
[Fri Oct 22 23:35:04 2010] [error] [client 192.168.1.9]
IndentationError: unindent does not match any outer indentation level
[Fri Oct 22 23:35:04 2010] [error] [client 192.168.1.9] Target WSGI
script not found or unable to stat: /home/dev/wsgi-scripts/favicon.ico


IS there some editor which does not insert some character without my
knowledge.<frustrated>

------------------------------------------
#!/usr/bin/env python

import os
from datetime import datetime
import re

class Handler:
    def do(self, environ, start_response):

       uri = environ['REQUEST_URI']

       html = "<html><head><title>Index of %s</title></head><body>" % uri
       html += "<h1>Index of %s</h1>" % uri
       html += "<table border='0'>"
       html += '<tr><th>Last
Modified</th><th>Size</th>Description</th><th>Webifiable</th><tr><th
colspan="6"><hr></th></tr>'
       html += '<tr><td><a href="..">Parent
Directory</a></td><td>&nbsp;</td><td align="right"> -
</td><td>&nbsp;</td><td>&nbsp;</td></tr>'
       html += '<tr><th colspan="6"><hr></th></tr>'
       html += "</tables>"

       html += "</body></html>"

       output = html
       mimeType = "text/html"

       status = "200 OK"
       response_headers = [("Content-type", mimeType),
                           ("Content-length", str(len(output)))]


  def application(self, environ, start_response): <line on which all
kind of trials with no luck>
        start_response(status, response_headers)
        return [output]

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to