views:

67

answers:

6

I have read in the documentation that there are 4 or 5 ways in which i can python for web pages. Like

  1. With CGI
  2. Mod_python : mod_python does have some problems. Unlike the PHP interpreter, the Python interpreter uses caching when executing files, so changes to a file will require the web server to be restarted
  3. FastCGI and SCGI
  4. mod_wsgi

SO which way should i go . does it means that python is not for webistes if there are too many problems while using it

I have to build the live business website with thousands of users so i should not use it if that has many probelms

A: 

I am a big fan of cherrypy. Yes there are a lot of choices out there.

buckbova
IS cherrypy different from Django
Mirage
Yes it is, and both are full frameworks in their own right, though some people mix n match, running Django apps on top of a CherryPy WSGI server layer.
Owen S.
A: 

You could also use Google App Engine with Python and Django

dplass
sorry i could not fully understood , what google has to do with running Python websites.you mean i have to install it for making python websites
Mirage
@Mirage: No, you do not have to. Google App Engine (GAE) is a product made by Google (the company), which you MAY choose to use for hosting Python web apps. It is one option among many.
David Zaslavsky
So it mean i can host my python website using GAE and i don't need to install anything else on server. Can you explain more . That looks good
Mirage
Yes, you install and run the code in Google's GAE servers. They provide all the hosting, database, storage, servers, etc.
dplass
+1  A: 

I believe mod_python is deprecated so you shouldn't use it. see http://blog.dscpl.com.au/2010/05/modpython-project-soon-to-be-officially.html

mod_wsgi is mentioned as a replacement.

Roman A. Taycher
And 'http://blog.dscpl.com.au/2010/06/modpython-project-is-now-officially.html'. Is now officially dead.
Graham Dumpleton
I wish I knew of a suitable replacement. mod_wsgi is great for dynamic web pages, but as far as I know, it can't hook apache handlers like mod_python can.
Forest
The mod_wsgi module can hook certain stuff in Apache, ie., host access control, authentication and authorisation providers. That covers most of what people actually want out of mod_python as far as hooking Apache.
Graham Dumpleton
A: 

Personally I use CGI or the Python *HTTPServer modules. CGI is very easy and seems a reasonable "unixy" approach. The *HTTPServer modules are minimal, and easy to extend if you're familiar with HTTP.

I've heard very good things about mod_wsgi, and hope to learn to use it sometime. My vote then is that you go with mod_wsgi, it's not even specific to just Python.

Matt Joiner
A: 

The important thing is that whatever you use to develop your Python web application, that it support the WSGI (http://www.wsgi.org) interface for hosting. So long as you do that, it can be hosted with any of options 1-4, albeit that CGI/WSGI bridge would only be used for small scripts and not large frameworks because of fact that new process has to be created for each request.

So, don't worry about the hosting mechanism as many exist and not just those above. Instead, start looking at the various framework and toolkits available. The most mainstream of these for Python is Django (http://www.djangoproject.com).

Graham Dumpleton
I am thinking of using PiP i.e python in PHP , IF i use frameworks , can ibe able to use that. i mean call from python functions inside php
Mirage
Yes you could, but I think you'd find that approach inconvenient and maybe slow. Give it a try, compare it to something like using Django natively from a template down through to data models, and see which you like better!
Owen S.
A: 

I think those problems are not strong enough to say Python is not for websites. And Python syntax is very clear and easy read. You should try Django for web development. It can reali speed up your development process.

Russell Wong