我想在浏览器中运行python文件。 我已经安装了apache。并配置了httd.conf
文件。 我已经创建了test.py
文件。 然后我尝试用我的浏览器运行test.py
,方法是输入htt://localhost/test.py
。当我这样做,我得到以下错误:在浏览器中运行.py文件
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
在我的错误日志
[Thu Jul 07 18:39:55 2011] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : couldn't create child process: 720002: test.py
[Thu Jul 07 18:39:55 2011] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : couldn't spawn child process: C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/test.py
可以在这里是什么问题?
运行的Python浏览器意味着你必须配置你的浏览器,而不是你的服务器。当您在浏览器中运行Python时,您的浏览器(FireFox,IE,Opera,Safari等)正在运行Python。这与Apache无关。你真的**想做什么? –
@ S.Lott如何配置浏览器? –