蟒蛇在Apache的Web开发 [英] Python for web development in Apache

查看:140
本文介绍了蟒蛇在Apache的Web开发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经打在mod_python的的Apache2,这似乎比蟒蛇不同的方式工作确实一般 - 有一点不同的语法和东西你需要做的。这不是很好的记录和之后与它玩了几天,我真的没有看到mod_python的点可言,尤其是当事情像PHP都做到有据可查和可用的。

我可以看到Python的行之有效的系统编程,但任何人都可以给任何信息,为什么我不应该只转储蟒蛇一个基于Web的应用程序?


解决方案

  1. 请不要使用mod_python的。一个常见的​​错误是采取了mod_python为mod_php的,但是对于蟒蛇,这就是不是真的。使用 mod_wsgi的来代替。

  2. 选择一个Web框架。 CherryPy的的。 Django的

  3. wsgi.org

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. 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

这篇关于蟒蛇在Apache的Web开发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆