title: Executing command line programs from within python
body: <p>I'm building a web application that will is going to manipulate (pad, mix, merge etc) sound files and I've found that <a href="http://sox.sourceforge.net/" rel="noreferrer">sox</a> does exactly what I want. Sox is a linux command line program and I'm feeling a little uncomfortable with having the python web app starting new sox processes on my server on a per request basis. </p>
  
  <p>Example:</p>
  
  <pre><code>import os
  os.system('sox input.wav -b 24 output.aiff rate -v -L -b 90 48k')
  </code></pre>
  
  <p>This whole setup seems a little unstable to me.</p>
  
  <p>So my question is, what's the best practice for running command line programs from within  a python (or any scripting language) web app?</p>
  
  <p>Message queues would be one thing to implement in order to get around the whole request response cycle. But is there other ways to make these things more elegant?</p>