title: subprocess running python getting import error
body: <p>I'm trying to run a python script from a python program by kicking it off from subprocess (The reason is that the main program has to have exited when the script runs, with a combination of wx.CallAfter and Close). However when the script runs I get an error on line 1 with <code>ImportError: No module named os</code> which makes me think it's something to do with the PythonPath, but I can run the script just fine from a terminal.</p>
  
  <p>Why can't the script see any core modules when run this way?</p>
  
  <p>Edit:
  The line in question is:</p>
  
  <pre><code>wx.CallAfter(subprocess.Popen,'python %s "%s" %s %s'%(os.path.join(BASE_DIR,"updatecopy.py"),BASE_DIR,pos[0],pos[1]),shell=True)
  </code></pre>
  
  <p>BASE_DIR is just the directory that the script lives in.</p>