I'm setting up a SOAP server using php. In processing the SOAP requests, I will then need to call some existing python scripts. These scripts have typically returned 3 values: success, description, and data.
How do I pass all three values back to the php?
My request is:
exec('python test.py', $output);
test.py does:
from getData import getData
status, description, data = getData()
return status, description, data
and my existing python looks something like this:
def getData():
database = Database()
# get all the Data from the db
data = database.getData()
if data is None:
return False, "...notes...", ""
return True, "...notes...", data
I'm not sure the return in test.py is correct. But even if it is, when I look at var_dump($output) all I see is "Array"
Anyone have any ideas?
TIA,
Brian
python test.pyon the command line?