title: python subprocess: how to run an app on OS X?
body: <p>I am porting a windows application to OS X 10.6.8. It is a new platform for me and I am facing some difficulties.</p>
  
  <p>The application is a small webserver (bottle+waitress) which is starting a browser (based on chromium embedded framework) thanks to a subprocess call.</p>
  
  <p>The browser is an app file and runs ok when started from gui.</p>
  
  <p>I am launching it this way:</p>
  
  <pre><code>subprocess.Popen([os.getcwd()+"/cef/cefclient.app", '--url=http://127.0.0.1:8100'])
  </code></pre>
  
  <p>Unfortunately, this fails with <code>OSError: permission denied</code>.</p>
  
  <p>I tried to run the script with a <code>sudo</code> with similar result.</p>
  
  <p>I can launch the app from shell with the following command:</p>
  
  <pre><code>open -a "cef/cefclient.app" --args --url-http://127.0.0.1:8100
  </code></pre>
  
  <p>But </p>
  
  <pre><code>subprocess.Popen(['open', '-a', os.getcwd()+'/cef/cefclient.app', '--args', '--url-http://127.0.0.1:8100'])
  </code></pre>
  
  <p>fails with the following error</p>
  
  <pre><code>FSPathMakeRef(/Users/.../cefclient.app) failed with error -43.
  </code></pre>
  
  <p>Any idea how to fix this issue?</p>