Yet Another Python Web Programming Question

Jorey Bump devnull at
Sun Jul 10 15:02:23 CEST 2005

Daniel Bickett <dbickett at> wrote in 
news:mailman.1556.1120970289.10512.python-list at

> I neglected to mention an important fact, and that is the fact that I
> am limited to Apache, which elminates several suggestions (that are
> appreciated none-the-less).

"Limited to Apache" is not the same as "using apache in a restricted 
environment", so we may need more clarification.

If you are looking for a solution that sits on top of apache somehow, and 
you have system administrative access, there are a lot of choices, 
including ones that use mod_python. If something is not intended to 
interface directly with apache, it can still be proxied through apache 
while it runs on an alternate local port (a standalone app with an 
embedded web server, for example).

If you mean that you're in a typical hosted environment with insufficient 
privileges to install or configure much of anything, you might be stuck 
with CGI. Since you mention in your original post that you have a folder 
in your home directory that's in sys.path, your provider is trying to do 
something to support python applications (hopefully, the path is specific 
to your virtual host, to avoid namespace collisions). In any case, if 
this was done to support mod_python, you can meet some of your criteria 
with mod_python.publisher, but you will almost certainly want to use a 
staging platform to develop your apps beforehand, since it is necessary 
to either restart apache or touch imported modules after editing.

BTW, this is how I use Python for web applications myself: Each virtual 
host gets a special directory prepended to the PYTHONPATH, in which the 
bulk of my applications are created as packages. Then I use 
mod_python.publisher to publish single modules that serve as interfaces, 
converting values from requests and passing them on to the packages, 
which I try to make web agnostic (in fact, I develop most of the backend 
code locally before even trying it out on the web, so I can use it in 
other application domains). 

I've looked at other offerings, but as soon as I see proprietary markup 
or commands embedded in HTML, I lose interest, so I feel your pain.

More information about the Python-list mailing list