Running Python web apps on shared ASO servers?

Emile van Sebille emile at fenx.com
Thu Aug 16 15:59:20 EDT 2012


On 8/16/2012 7:01 AM Gilles said...
> On Sun, 12 Aug 2012 02:03:33 +0200, Gilles <nospam at nospam.com> 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
> reincarnation
>
> 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 paj39:~$ mkdir web
emile at paj39:~$ cd web
emile at paj39:~/web$ cat > test.html
hello from test.html
emile at paj39:~/web$ python -m SimpleHTTPServer

Then browse to localhost:8000/test.html

Emile






More information about the Python-list mailing list