emile at fenx
Aug 16, 2012, 12:59 PM
Post #7 of 7
On 8/16/2012 7:01 AM Gilles said...
Re: Running Python web apps on shared ASO servers?
[In reply to]
> On Sun, 12 Aug 2012 02:03:33 +0200, Gilles <nospam [at] nospam> wrote:
>> Does it mean that ASO only supports writing Python web apps as
>> long-running processes (CGI, FCGI, WSGI, SCGI) instead of embedded
>> Python à la PHP?
> I need to get the big picture about the different solutions to run a
> Python web application.
>>From what I read, it seems like this is the way things involved over
> the years:
> CGI : original method. Slow because the server has to spawn a new
> process to run the interpreter + script every time a script is run.
> mod_python : Apache module alternative to CGI. The interpreter is
> loaded once, and running a script means just handling the script
> mod_wsgi : mod_python is no longer developped, and mod_wsgi is its new
> FastCGI and SCGI: Faster alternativees to CGI; Run as independent
> programs, and communicate with the web server through either a Unix
> socket (located on the same host) or a TCP socket (remote host)
> Is this correct?
> Thank you.
I'm sure there's no single correct answer to this.
Consider (python 2.6]:
emile [at] paj3:~$ mkdir web
emile [at] paj3:~$ cd web
emile [at] paj3:~/web$ cat > test.html
hello from test.html
emile [at] paj3:~/web$ python -m SimpleHTTPServer
Then browse to localhost:8000/test.html