|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Wed, 23 Apr 2008 20:11:06 +0200, vijay <gvijaysrinivas@gmail.com> 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?? popen() or proc_open() seem ideal to me. -- Rik Wasmus |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Apr 23, 11:11 am, vijay <gvijaysrini...@gmail.com> wrote:
> > 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?? There are several ways, none is perfect. 1. Wrap your Python class into a command-line Python script and have the PHP script run it and pass it the arguments via command line. 2. Wrap your Python class into a Web service (you will need to install mod_python or configure your Python interpreter to work as a CGI program) and have the PHP script and pass it the arguments via POST. 3. Extend .Net to support PHP (with Phalanger) and Python (with IronPython) and see if you can get the two to work together within .Net. 4. Extend .Net to support Python, compile your class into a DLL and then wrap that DLL into a PHP extension. Cheers, NC |
|
![]() |
| Outils de la discussion | |
|
|