Re: Calling Python code from inside php

2008-04-26 Thread Diez B. Roggisch
Eric Wertman schrieb: > A simple yet dangerous and rather rubbish solution (possibly more of a > hack than a real implementation) could be achieved by using a > technique described above: > > echo exec('python foo.py'); This will spawn a Python interpreter, and not be particularly

Re: Calling Python code from inside php

2008-04-25 Thread Nick Stinemates
On Fri, Apr 25, 2008 at 03:29:49PM +0200, Diez B. Roggisch wrote: > Nick Stinemates schrieb: >>> While I certainly prefer to use Python wherever I can, that does not mean >>> that there aren't cases where legacy systems or other constraints make >>> this impossible. If I have e.g. a type3-based w

Re: Calling Python code from inside php

2008-04-25 Thread Eric Wertman
> > A simple yet dangerous and rather rubbish solution (possibly more of a > > hack than a real implementation) could be achieved by using a > > technique described above: > > > > > echo exec('python foo.py'); > > This will spawn a Python interpreter, and not be particularly > effi

Re: Calling Python code from inside php

2008-04-25 Thread sturlamolden
On Apr 23, 9:08 pm, MC <[EMAIL PROTECTED]> wrote: > 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. This is perhaps the p

Re: Calling Python code from inside php

2008-04-25 Thread alexelder
On Apr 25, 4:02 pm, sturlamolden <[EMAIL PROTECTED]> wrote: > On Apr 23, 9:13 pm, [EMAIL PROTECTED] wrote: > > > A simple yet dangerous and rather rubbish solution (possibly more of a > > hack than a real implementation) could be achieved by using a > > technique described above: > > > > e

Re: Calling Python code from inside php

2008-04-25 Thread sturlamolden
On Apr 23, 9:13 pm, [EMAIL PROTECTED] wrote: > A simple yet dangerous and rather rubbish solution (possibly more of a > hack than a real implementation) could be achieved by using a > technique described above: > > echo exec('python foo.py'); This will spawn a Python interpreter, and not

Re: Calling Python code from inside php

2008-04-25 Thread Diez B. Roggisch
Nick Stinemates schrieb: While I certainly prefer to use Python wherever I can, that does not mean that there aren't cases where legacy systems or other constraints make this impossible. If I have e.g. a type3-based website - "how on earth" should I replace that with Python (without wasting a l

Re: Calling Python code from inside php

2008-04-24 Thread sturlamolden
On Apr 24, 5:51 am, Nick Stinemates <[EMAIL PROTECTED]> wrote: > I don't understand how the 2 are mutually exclusive? > > You can have PHP and Python bindings installed on the same Apache > server, unless I'm mistaken? Not everyone have the luxury of having mod_python installed. It depends on the

Re: Calling Python code from inside php

2008-04-24 Thread Nick Stinemates
> While I certainly prefer to use Python wherever I can, that does not mean > that there aren't cases where legacy systems or other constraints make this > impossible. If I have e.g. a type3-based website - "how on earth" should I > replace that with Python (without wasting a lot of time)? I do

Re: Calling Python code from inside php

2008-04-23 Thread Diez B. Roggisch
A simple yet dangerous and rather rubbish solution (possibly more of a hack than a real implementation) could be achieved by using a technique described above: What is rubbish about that - except from the obvious cleansing of input variables that has to take place? Python has a whole module d

Re: Calling Python code from inside php

2008-04-23 Thread Tobiah
On Wed, 23 Apr 2008 20:42:44 +0200, Diez B. Roggisch wrote: > 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 >>

Re: Calling Python code from inside php

2008-04-23 Thread alexelder
On Apr 23, 7:42 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > 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 th

Re: Calling Python code from inside php

2008-04-23 Thread MC
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 -- http://mail.python.org/mailman/lis

Re: Calling Python code from inside php

2008-04-23 Thread Diez B. Roggisch
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 do

Re: Calling Python code from inside php

2008-04-23 Thread Nick Stinemates
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 t

Calling Python code from inside php

2008-04-23 Thread vijay
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/pyt