title: Simple python command to capture shell execution output?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4760215/running-shell-command-from-python-and-capturing-the-output">Running shell command from python and capturing the output</a>  </p>
  </blockquote>
  
  
  
  <p>When I want to capture shell execution output, I do this.</p>
  
  <pre><code>declare TAGNAME=`git describe --tags` 
  </code></pre>
  
  <p>Simple. I looked for this in Python, but most of them looks very complex. What's the simplest way to do this? Yeah I know I can make a function, but I want to know pre-defined function if it is exist.</p>
  
  <pre><code>tagname = theFunc('git describe --tags')
  </code></pre>