将python用作在本地主机上使用的服务器脚本语言的最佳方法 [英] The best way to use python as a server scripting language for use on localhost

查看:113
本文介绍了将python用作在本地主机上使用的服务器脚本语言的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

相对长期的PHP用户.此时,我可以在睡眠中安装XAMPP,直到可以在本地主机"的浏览器中运行PHP脚本,但是在使用Python查找相似路径的搜索中,我用完了Googling的构想.我发现了mod_python Apache mod,但是后来我也发现它已经停产了.我非常希望在浏览器中而不是在命令提示符下进行Python学习,因此,如果有人可以指出我的正确路径,我将不胜感激.

谢谢!

解决方案

好,mod_python已退役.因此,要托管python应用程序,您需要mod_wsgi

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

但是python并不是真的像php(因为我正确理解了您的问题,因此您将其与html混合以获取输出).在学习python时,我认为使用命令行/repl可能会更加有用/直截了当.如果您主要将python作为Web开发,则应研究django( http://www.djangoproject.com/),因为它可能更接近您要查找的内容.

relatively long-time PHP user here. I could install XAMPP in my sleep at this point to the point where I can get a PHP script running in the browser at "localhost", but in my searches to find a similar path using Python, I've run out of Googling ideas. I've discovered the mod_python Apache mod, but then I also discovered that it's been discontinued. I'd greatly prefer to do my Python learning in a browser as opposed to the command prompt, so if anybody could point me along the proper path, I'd be very grateful.

Thanks!

解决方案

well mod_python has been retired. So in order to host python apps you want mod_wsgi

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

But python isn't really like php(as in you mix it with html to get output, if I understand your question correctly). In learning python, using the command line/repl will probably be much more useful/straight forward I would think. If you are looking for python as primarily web development you should look into django (http://www.djangoproject.com/) as that might be closer to what you are looking for..

这篇关于将python用作在本地主机上使用的服务器脚本语言的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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