从php里面调用Python代码 [英] Calling Python code from inside php
问题描述
嗨
我有一个python代码为我执行一些计算。我有一个
html页面,它将某些argumnets传递给php页面。这个php页面
需要将值传递给Python类并获得结果
返回。
如何解决这个问题?
干杯
Vijay
2008年4月23日星期三上午11:09:53 -0700 ,vijay写道:
嗨
我有一个python代码为我执行一些计算。我有一个
html页面将某些argumnets传递给php页面。这个php页面
需要将值传递给Python类并获得结果
返回。
如何解决这个问题?
干杯
Vijay
-
< a rel =nofollowhref =http://mail.python.org/mailman/listinfo/python-listtarget =_ blank> http://mail.python.org/mailman/listinfo/python-list
为什么不用Python写出来呢?
-
Nick Stinemates(ni ** @ stinemates。 org)
http://nick.stinemates.org
vijay schrieb:
嗨
我有一个python代码为我执行一些计算。我有一个
html页面将某些argumnets传递给php页面。这个php页面
需要将值传递给Python类并获得结果
返回。
如何解决这个问题?
在python中编写一个命令行应用程序,它可以帮到你。调用
使用php。
或者使用类似pyphp的东西 - 但是我还没用过它,不能发表评论
其可用性/支持等。
Diez
嗨!
如果你在Windows下,你可以:
- 通过Active-Scripting调用Python的函数
- 调用Python COM服务器(函数或属性)
为此,请使用Pywin32。而且,在所有情况下,通话功能都可以使用
参数。
-
@ -salutations
Michel Claveau
Hi
I have a python code performing some computation for me.I have a
html page which passes certain argumnets to a php page.This php page
needs to pass on the value to the Python class and get the result
back.
How do I go about this??
Cheers
Vijay解决方案On Wed, Apr 23, 2008 at 11:09:53AM -0700, vijay wrote:Hi
I have a python code performing some computation for me.I have a
html page which passes certain argumnets to a php page.This php page
needs to pass on the value to the Python class and get the result
back.
How do I go about this??
Cheers
Vijay
--
http://mail.python.org/mailman/listinfo/python-listWhy not just write it all in Python?
--
Nick Stinemates (ni**@stinemates.org)
http://nick.stinemates.org
vijay schrieb:Hi
I have a python code performing some computation for me.I have a
html page which passes certain argumnets to a php page.This php page
needs to pass on the value to the Python class and get the result
back.
How do I go about this??Write a commandline-app in python, that does the work for you. Invoke
that using php.
Or use something like pyphp - but I haven''t used it, can''t comment on
its usability/support etc.
Diez
Hi!
If you are under Windows, you can:
- call Python''s functions via Active-Scripting
- call a Python COM server (functions or properties)
For that, use Pywin32. And, in all cases, call functions can use
parameters.
--
@-salutations
Michel Claveau
这篇关于从php里面调用Python代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!