Re: [PHP] how can one run python script in php
On Dec 8, 2010, at 5:50 PM, Moses wrote: > Hi Everyone, > > I am trying to run a python script in php using exec or system command, but > there is > no answer. > > musa I agree we need to see what you have done and on what OS but something like this is what you should be looking at: $data_from_stdout = exec("/usr/bin/python /path/to/your/python_app.py"); Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how can one run python script in php
On 8 December 2010 22:50, Moses wrote: > Hi Everyone, > > I am trying to run a python script in php using exec or system command, but > there is > no answer. > > musa > I use windows and http://docs.php.net/manual/en/install.windows.manual.php and http://docs.php.net/manual/en/install.windows.commandline.php contain all the details I've ever needed for a manual installation of PHP. Using the same rules for Python would allow you to simply run the .py script or the .pyc script just as easily as you can run PHP or a .BAT/.CMD script. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] how can one run python script in php
Try CURL http://www.php.net/manual/en/book.curl.php Richard L. Buskirk -Original Message- From: Moses [mailto:jam...@gmail.com] Sent: Wednesday, December 08, 2010 5:51 PM To: php-general@lists.php.net Subject: [PHP] how can one run python script in php Hi Everyone, I am trying to run a python script in php using exec or system command, but there is no answer. musa -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how can one run python script in php
On Wed, Dec 8, 2010 at 2:50 PM, Moses wrote: > I am trying to run a python script in php using exec or system command, but > there is no answer. > If you post the code you have tried, we can point out any errors you're making and help you find the solution. David