3

I've been a PHP developer for quite awhile, and I've heard good things about using Python for web scripting. After a bit of research, I found mod_python, which integrates with Apache to allow Python Server Pages, which seem very similar to the PHP pages I'm used to. I also found a mod_wsgi which looks similar.

I was wondering which implementation the good people of Stack Overflow would recommend for someone who wants good integration with Apache and MySQL and similar functionality to PHP.

DLH
  • 2,771
  • 3
  • 23
  • 30

1 Answers1

3

I believe mod_wsgi is the preferred option to mod_python:

http://code.google.com/p/modwsgi/

Some performance benchmarks seem to suggest that mod_wsgi performs much better also.

http://code.google.com/p/modwsgi/wiki/PerformanceEstimates

Jonathan Holloway
  • 62,090
  • 32
  • 125
  • 150
  • Can mod_wsgi handle Python Server Pages in the same way that this does? http://webpython.codepoint.net/mod_python_psp_hello_world More specifically, does it allow me to embed blocks of Python into an HTML page using delimiters? – DLH Jul 23 '09 at 17:19
  • I think Python Server Pages is a feature of mod_python - so prob not, somebody correct me if I'm wrong here. However, there are loads of templating languages with Python (http://wiki.python.org/moin/Templating)... and (http://stackoverflow.com/questions/98245/what-is-your-single-favorite-python-templating-engine). Why do you want to use PSP in particular? – Jonathan Holloway Jul 23 '09 at 18:28
  • I like the way PHP is embedded into HTML, and I wanted to do the same with Python. – DLH Jul 23 '09 at 19:01
  • 1
    Ok, you should take a look at Spyce if you're going to go down the mod_wsgi route - http://spyce.sourceforge.net/docs/doc-intro_rationale.html It's very similar with the same design principles as PSP. – Jonathan Holloway Jul 23 '09 at 19:58
  • The long term viability of mod_python is currently also in question. This and use of PSP was just today begin discussed on mod_python list. See 'http://www.modpython.org/pipermail/mod_python/2009-July/026276.html'. Use of an alternate templating system on top of WSGI is definitely a better long term solution. – Graham Dumpleton Jul 24 '09 at 00:22