Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #26928 > unrolled thread
| Started by | Gilles <nospam@nospam.com> |
|---|---|
| First post | 2012-08-12 02:03 +0200 |
| Last post | 2012-08-16 12:59 -0700 |
| Articles | 7 — 4 participants |
Back to article view | Back to comp.lang.python
Running Python web apps on shared ASO servers? Gilles <nospam@nospam.com> - 2012-08-12 02:03 +0200
Re: Running Python web apps on shared ASO servers? Dieter Maurer <dieter@handshake.de> - 2012-08-12 07:56 +0200
Re: Running Python web apps on shared ASO servers? Gilles <nospam@nospam.com> - 2012-08-12 22:52 +0200
Re: Running Python web apps on shared ASO servers? Tim Golden <mail@timgolden.me.uk> - 2012-08-12 22:26 +0100
Re: Running Python web apps on shared ASO servers? Gilles <nospam@nospam.com> - 2012-08-13 13:28 +0200
Re: Running Python web apps on shared ASO servers? Gilles <nospam@nospam.com> - 2012-08-16 16:01 +0200
Re: Running Python web apps on shared ASO servers? Emile van Sebille <emile@fenx.com> - 2012-08-16 12:59 -0700
| From | Gilles <nospam@nospam.com> |
|---|---|
| Date | 2012-08-12 02:03 +0200 |
| Subject | Running Python web apps on shared ASO servers? |
| Message-ID | <qbsd289b9ndtrb5sg17u8gr8rge60kci4p@4ax.com> |
Hello I use A Small Orange (ASO) as my web provider. Asking the question in their forum so far didn't work, so I figured I might have a faster answer by asking here. Support replied this in an old thread: "Just a CGI option. We don't have enough users to justify adding mod_python support." http://forums.asmallorange.com/topic/4672-python-support/page__hl__python http://forums.asmallorange.com/topic/4918-python-fcgi-verses-mod-python/ 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? If that's the case, which smallest tool would you recomment to write basic apps, eg. handling forms, etc.? Thank you.
[toc] | [next] | [standalone]
| From | Dieter Maurer <dieter@handshake.de> |
|---|---|
| Date | 2012-08-12 07:56 +0200 |
| Message-ID | <mailman.3206.1344751000.4697.python-list@python.org> |
| In reply to | #26928 |
Gilles <nospam@nospam.com> writes: > ... > Support replied this in an old thread: "Just a CGI option. We don't > have enough users to justify adding mod_python support." > http://forums.asmallorange.com/topic/4672-python-support/page__hl__python > http://forums.asmallorange.com/topic/4918-python-fcgi-verses-mod-python/ > > 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? It looks as if you could use CGI to activate Python scripts. There seems to be no mod_python" support. You should probably read the mentioned forum resources to learn details about the Python support provided by your web site hoster.
[toc] | [prev] | [next] | [standalone]
| From | Gilles <nospam@nospam.com> |
|---|---|
| Date | 2012-08-12 22:52 +0200 |
| Message-ID | <4i5g2890hj3d1tuqe21o0dssh39tair3s2@4ax.com> |
| In reply to | #26937 |
On Sun, 12 Aug 2012 07:56:26 +0200, Dieter Maurer <dieter@handshake.de> wrote: >You should probably read the mentioned forum resources to learn >details about the Python support provided by your web site hoster. Yup, but so far, no answer, so I figured someone here might now. Those articles seem to indicate that CGI isn't a good solution when mod_python isn't available, so it looks like I'll have to investigate FastCGI, WSGI, etc. http://docs.python.org/howto/webservers.html http://stackoverflow.com/questions/219110/how-python-web-frameworks-wsgi-and-cgi-fit-together Thank you.
[toc] | [prev] | [next] | [standalone]
| From | Tim Golden <mail@timgolden.me.uk> |
|---|---|
| Date | 2012-08-12 22:26 +0100 |
| Message-ID | <mailman.3211.1344806873.4697.python-list@python.org> |
| In reply to | #26954 |
On 12/08/2012 21:52, Gilles wrote: > On Sun, 12 Aug 2012 07:56:26 +0200, Dieter Maurer > <dieter@handshake.de> wrote: >> You should probably read the mentioned forum resources to learn >> details about the Python support provided by your web site hoster. > > Yup, but so far, no answer, so I figured someone here might now. > > Those articles seem to indicate that CGI isn't a good solution when > mod_python isn't available Just to make a point: one person's "isn't a good solution" is another person's "works perfectly well for me". Modern servers are really quite quick: the cost of starting up a Python process and generating an HTML page can be really quite low. I've certainly had low-traffic production websites running for years on CGI without anyone complaining. If speed was an issue or if I thought that I'd be getting more requests than I am then I'd consider a more sophisticated solution. TJG
[toc] | [prev] | [next] | [standalone]
| From | Gilles <nospam@nospam.com> |
|---|---|
| Date | 2012-08-13 13:28 +0200 |
| Message-ID | <i5ph28lpcqi50996qle9sv7uve3v4cugru@4ax.com> |
| In reply to | #26955 |
On Sun, 12 Aug 2012 22:26:19 +0100, Tim Golden <mail@timgolden.me.uk> wrote: >Just to make a point: one person's "isn't a good solution" is another >person's "works perfectly well for me". Modern servers are really quite >quick: the cost of starting up a Python process and generating an HTML >page can be really quite low. I've certainly had low-traffic production >websites running for years on CGI without anyone complaining. Thanks Tim for the input. I'll try the different solutions available and see if CGI is good enough for my needs.
[toc] | [prev] | [next] | [standalone]
| From | Gilles <nospam@nospam.com> |
|---|---|
| Date | 2012-08-16 16:01 +0200 |
| Message-ID | <u2vp289gg33grfqidq6jofpcbokmnrstl4@4ax.com> |
| In reply to | #26928 |
On Sun, 12 Aug 2012 02:03:33 +0200, Gilles <nospam@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.
[toc] | [prev] | [next] | [standalone]
| From | Emile van Sebille <emile@fenx.com> |
|---|---|
| Date | 2012-08-16 12:59 -0700 |
| Message-ID | <mailman.3392.1345147179.4697.python-list@python.org> |
| In reply to | #27165 |
On 8/16/2012 7:01 AM Gilles said... > On Sun, 12 Aug 2012 02:03:33 +0200, Gilles <nospam@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@paj39:~$ mkdir web emile@paj39:~$ cd web emile@paj39:~/web$ cat > test.html hello from test.html emile@paj39:~/web$ python -m SimpleHTTPServer Then browse to localhost:8000/test.html Emile
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web