title: PHP doesn't run python correctly
body: <p>I can get my script to run, but it won't run correctly and I'm very confused.  I'm trying to create a website where a user clicks a button, and this causes a python script on the server to start running.  The script is supposed to be able to open a csv file, and work with the data stored in it.  This script works if I run it normally from the command line.  It is able to open the csv files, and if the file doesn't exist, gives me an error like this:</p>
  
  <pre><code>Traceback (most recent call last):
  File "LaserProfile.py", line 224, in electrodeData
  data = np.loadtxt(filepath, delimiter = ",", skiprows = 2)
  File "C:\Anaconda\lib\site-packages\numpy\lib\npyio.py", line 734, in loadtxt
  fh = iter(open(fname, 'U'))
  IOError: [Errno 2] No such file or directory: '\\\\172.16.113.55\\file_root\\U1\\2015\\03\\566\\Laser\\15997.csv'
  </code></pre>
  
  <p>Basically, runs exactly the way it should.  However, when the python script is told to execute by the PHP script, it seems to run fine EXCEPT it loses all capability to open these csv files, for each one returning an error like this:</p>
  
  <pre><code>Traceback (most recent call last): 
  File "M:\GitHub\ETL\LaserProfile.py", line 224, in electrodeData 
  data = np.loadtxt(filepath, delimiter = ",", skiprows = 2) 
  File "C:\Anaconda\lib\site-packages\numpy\lib\npyio.py", line 734, in loadtxt 
  fh = iter(open(fname, 'U')) 
  IOError: [Errno 22] invalid mode ('U') or filename: '\\\\172.16.113.55\\file_root\\U1\\2015\\04\\617\\Laser\\16687.csv' 
  </code></pre>
  
  <p>In both cases, the script is being run from the same computer (Windows Server 2012).  I don't see why I'm getting Errno22 here (especially since this is a file that processed correctly when running directly from the command line).</p>
  
  <p>If it helps, here is my PHP:</p>
  
  <pre><code>&lt;?php
      $pyscript = $_REQUEST["q"];
      $clientIP = $_SERVER['REMOTE_ADDR'];
      $basepath = "M:\\GitHub\\ETL\\";
      $pypath = $basepath.$pyscript;
      $hostIP = "172.16.111.45";
      $cmd = "python $pypath $clientIP";
      echo "Executing: $cmd &lt;br /&gt; Result: &lt;br /&gt;";
      $result = `$cmd`;
      echo $result;
  ?&gt;
  </code></pre>
  
  <p>And I'm running it from the command line with <code>python LaserProfile.py</code> (The script is not utilizing any parameters in sys.argv yet).</p>
  
  <p>Why is it running fine from the command line but not from PHP?</p>