Hi there: I am writing a small wsgi framework on which il will run my website It works on my computer, but when I upload the scripts it's not working Here are the parts that I suppose are breaking it: this is the module
class wsgiappl():
def __call__(self, environ, start_response):
self.environ = environ
# post headers
start_response("200 OK", [("Content-type", "text/html")])
path = environ.get("PATH_INFO")
urlpostdict = {'url':path, 'post':self.post()}
url = self.findurl(path)
if url == None: return "Error 404!"
try:
__ret = getattr(__main__, url)(urlpostdict)
except TypeError:
__ret = getattr(__main__, url)()
return __ret
def findurl(self, path):
try:
return self.urls[path]
except KeyError:
for k in self.urls:
match = re.match(k, path)
if match != None and match == path:
return self.urls[k]
else:
return None
def post(self):
try:
length=int(self.environ.get('CONTENT_LENGTH', '0'))
except ValueError:
length = 0
if length != 0: return self.environ['wsgi.input'].read(length)
return ""
and this is my index.wsgi
import cms
urls = {'/':'index'}
application = cms.wsgiappl()
the server has been configured so it recognises index.wsgi as an index file, and other script work fine both the files are modded 644 I am getting a 500 Error and nothing else Can anybody help? Does anybody know where the Erro Log files are? Edit: The whole problem is caused from the import statement, see last post for more info