PyApache

Gregory Trubetskoy grisha at ispol.com
Mon Dec 13 17:59:33 EST 1999


I do get quite a bit of e-mails regarding CGI support. Some people want
the CGI support, and some people assume that a "print" statement will
send output to the socket and ask me "why doesn't it work?"

While "printing" output seems like a very simple way to go, you loose out
on the ability to subclass and modify output in your subclass... Httpdpay
was never meant as a way to speed-up or mimic CGI, it was meant to be a
superior alternative to CGI programming, which (CGI, that is), IMHO is
just lame.

This is not to say that httpdapy is not powerful enough to support CGI, I
just tried to leave the implementation to the imagination of the end user.
I even left subtle hints in the source, for example the undocumented
build_cgi_env() function... ;)

Well, since some people have a love affair with CGI and insist on things
being handed to them on a silver platter - here is an example of how you
could run CGI scripts in the manner described below ("persistent"):

http://www.ispol.com/home/grisha/httpdapy/new/extra/cgi_handler.py

Enjoy. Note - I haven't tested this thoroughly.

P.S. I am not at all sure what you mean by "It has to run under NT and
Linux". This has nothing to do with CGI. All you need to be able to do is
to compile Apache+httpdapy+Python on NT, which, last time I tried (over a
year ago) worked just fine.

P.P.S PyApache doesn't do this anymore, it will reset the interpreter
every time. Keeping the interpreter around in a CGI environment is a can
of worms.

--
  Gregory (Grisha) Trubetskoy
       grisha at ispol.com

On Wed, 17 Nov 1999, Florent Ramière wrote:

> Hi !
> 
>     Well, i have head about httpdapy, but i have read the documentation, and
> it seems that the code has to be modified.  This solution can not be used
> for my needs. (It has to run under NT and Linux !)
> 
>     I may have missed something with httpdapy, did I ?
> 
>     Well, PyApache certainly does such a job, but I cannot find how !
> 
>     such a shame,
> 
> Florent.
> 
> <bgkloss at my-deja.com> wrote in message news:80u49o$m48$1 at nnrp1.deja.com...
> >
> > >     I have the same problem !
> > >     Does anyone found a solution for this problem, or does pyApache
> > > absolutly do not handle such a functionnality (maybe) ?
> > >
> > > Florent.
> > >
> > > leon <leonar_n at epita.fr> wrote in message
> > > news:80p6p4$or5$1 at oceanite.cybercable.fr...
> > > > Hi,
> > > >
> > > > I'm using PyApache, and I would like to know if it's possible to
> > make
> > > > 'persistent' modules. In fact I want to do only one "import file.py"
> > like
> > > in
> > > > mod_perl, instead of loading this file each time the script is
> > parsed.
> >
> > I'm using httpdapy (http://www.ispol.com/home/grisha/httpdapy) and it
> > only loads my modules once -unless, of course, i modify them.
> >
> >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
> 
> 
> 




More information about the Python-list mailing list