Use Python on MAMP

谁说胖子不能爱 提交于 2019-12-03 15:59:54

Got it to work, the problem were the missing CGI interpretation of MAMP outside of the cgi-bin/ folder (see original post) and the missing headers :

print 'Content-type: text/html\n\n'

This is just standard CGI, nothing special here, no need for WSGI. You do need to install Python. You can install it wherever you like, as long as your script can find it. You see the line:

#! /usr/bin/python

that is where the script will try to find Python, so change it to your Python installation, or fix your Python installation to be there.

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