title: Passing argument from PHP to Python not working
body: <p>I have a python srcipt, called rainbow.py. I can run it optionally with an argument. From command line
  <code>python rainbow.py</code>,    <code>python rainbow.py 4</code>  works well. When I call this script from php I am unable to pass the argument.
  I tried:</p>
  
  <pre><code>$argument=4; 
  exec("python rainbow.py 4");
  exec("python rainbow.py $argument");
  exec("python rainboy.py .$argument"); 
  </code></pre>
  
  <p>They make the code run like there's no valid argument. (I use <code>duration=int(sys.argv[1]</code> in my python code, the script needs to stop after a while, and when calling from php, always the default duration is active)
  I tried </p>
  
  <p><code>$argument="4"</code></p>
  
  <p>too, did not work.
  Can you tell me what's wrong?How can I pass this argument through? I am confident with python, but a total php newbie.</p>
  
  <p>part of my php code:</p>
  
  <pre><code>$argument="2";
  echo "printing line  &lt;br&gt;";
  
  exec("python rainbow.py $argument");//duration option does not work
  </code></pre>
  
  <p>part of my python code:</p>
  
  <pre><code>duration=10
  
  try:
      if sys.argv[1]!=None:
          print "arg found!"
  
          duration=int(sys.argv[1])
  except: pass
  print "duration:",duration
  </code></pre>
  
  <p>I cant see the duration printing out when calling python from php, but from LEDs I can cleary see the duration is always 10 seconds</p>