Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Trying to pipe a Python script
Index -> Programming, PHP -> PHP Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
BigBear




PostPosted: Tue Jan 08, 2013 9:10 am   Post subject: 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');


does not seem to work.

The output file is owned by www-data and it is empty.
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Tue Jan 08, 2013 3:23 pm   Post subject: 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
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Display posts from previous:   
   Index -> Programming, PHP -> PHP Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: