Docunext

  • About

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, mycar = car(), and when mycar is created, init is called. If you want to run mycar as a function, you can call mycar(), 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: 2010 2003 2005 2006 2007 2008 2009 2004 2011 2012 2013 2015 2019 2020