
-----------------------------------
BigBear
Tue Jan 08, 2013 9:10 am

Trying to pipe a Python script
-----------------------------------
I have a python script that I would like to be able to run from a webpage.

I am trying to call the script in php and pipe the output to a file.

Then read the output file and display it on the web page.

[code]system('python script.py > output.txt');[/code]

does not seem to work. 

The output file is owned by www-data and it is empty.

-----------------------------------
Tony
Tue Jan 08, 2013 3:23 pm

RE:Trying to pipe a Python script
-----------------------------------
in what way does it not work? What's the return value of the execution?

http://php.net/manual/en/function.system.php
