title: passing data from php to python in laravel 5
body: <p>So i have seen other questions like this, but what i have seen isn't working and i'm not sure if its a laravel 5 thing or not.</p>
  
  <p>i have a python file -  jobs.py:</p>
  
  <pre><code>import yaml
  import requests
  import os
  import inspect
  import sys
  import datetime
  import random
  import urllib2
  import cPickle 
  
  
  
  print "hey"
  print sys.argv[1]
  print str(sys.argv)
  </code></pre>
  
  <p>In the normal linux command line if I type in the following:</p>
  
  <blockquote>
    <p>python
    /home/mscarpa/PhpstormProjects/quasar-node/quasar-node/quasar-node/src/lib/jobs.py
    arg1 arg2</p>
  </blockquote>
  
  <p>I will get this response as expected:</p>
  
  <blockquote>
    <p>hey
        arg1
        ['/home/mscarpa/PhpstormProjects/quasar-node/quasar-node/quasar-node/src/lib/jobs.py',
    'arg1', 'arg2']</p>
  </blockquote>
  
  <p>But when i try to do the same thing in my php file:</p>
  
  <pre><code>public function getJobs()
  {
      $jobs = \App\Job::all();
      $var1 = "arg1";
      $command = exec('python /home/mscarpa/PhpstormProjects/quasar-node/quasar-node/quasar-node/src/lib/jobs.py  $var1');
      return view('jobs/jobs_table', compact('jobs'));
  }
  </code></pre>
  
  <p>And start using xdebug to see what is going on it says that its connected when its steps over $command but $command only returns "hey". I am trying to pass $var1='arg1' to the python script.</p>
  
  <p>Thanks</p>