Docunext


Apache2 and python mod wsgi

January 2nd, 2008

libapache2-mod-wsgi

installed mod_wsgi and web.py 0.2

"Premature end of script headers" was getting caused by a collision with a cgi-script directive I had elsewhere in my config, as well as an incorrect mode setting, I think.

Now I'm on to python-xml... trying to generate a simple xml document. Switched to lxml, got it.

But now I'm wondering how to architect WSGI requests. Maybe I should use paste or cherrypy middleware? I'm just a little confused about the best way to instantiate and run web applications a daemons.

What's up with __call__?

I finally figured out what's up with call. Imagine you have a class. You create an object instance of it. class car, my_car = car(), and when my_car is created, init is called. If you want to run my_car as a function, you can call my_car(), but you'll need a call function. I'm not really sure what the benefit of this is, but I imagine its good for something.

Apache 2 and mod_wsgi

Yearly Indexes: 2003 2004 2006 2007 2008 2009 2010 2011 2012 2013 2015 2019 2020 2022