title: PHP calling Python, returning multiple values
body: <p>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.</p>
  
  <p>How do I pass all three values back to the php?</p>
  
  <p>My request is:</p>
  
  <pre><code>exec('python test.py', $output);
  </code></pre>
  
  <p>test.py does:</p>
  
  <pre><code>from getData import getData
  
  status, description, data = getData()
  
  return status, description, data
  </code></pre>
  
  <p>and my existing python looks something like this:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>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"</p>
  
  <p>Anyone have any ideas?</p>
  
  <p>TIA,</p>
  
  <p>Brian</p>