Python for web development in Apache [closed]

♀尐吖头ヾ 提交于 2019-12-03 05:10:00

问题


I've been playing with mod_python in apache2 which seems to work differently than python does in general - there's a bit different syntax and things you need to do. It's not very well documented and after a few days of playing with it, I'm really not seeing the point of mod_python at all, especially when things like php are so well documented and available.

I can see how Python works well for system programming, but can anyone give any information as to why I shouldn't just dump python for a web-based application?


回答1:


  1. Don't use mod_python. A common mistake is take mod_python as "mod_php, but for python" and that is not true. Use mod_wsgi instead.
  2. Choose a web framework. CherryPy. Pylons. Django.
  3. Look at wsgi.org



回答2:


mod_python wasn't really made for doing basic webprogramming. I suggest you go with a framework:

  • django
  • cherrypy
  • web.py

My suggestion is to give python some time. It's easy to get simplicity and lack of power confused. :)



来源:https://stackoverflow.com/questions/215815/python-for-web-development-in-apache

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!