title: python script to execute git command and display output on a html page
body: <p>I'm a newbie to python and git. Im trying to write a python script to execute the git commands and diplay the output on a html page when a button is clicked on the html page. I'm trying to make use of  subprocess.Popen. But it displays nothing. Please help me out!!</p>
  
  <pre><code>#!/usr/bin/env python2.5
  import cgi
  import subprocess
  import os
  print "Content-type: text/html\n"
  print
  print """\
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt; Initialization of Repository &lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;h2&gt;&lt;pre&gt;              Initialization of Git Repo &lt;/pre&gt;&lt;/h2&gt;
  """
  pr=subprocess.Popen(['/usr/bin/git','init'],
      cwd=os.path.dirname('/home/manju/Desktop/manju/'),
      stdout=subprocess.PIPE,stderr=subprocess.PIPE,shell=False)
  (out,error)=pr.communicate()
  print """\
  print '%s\n'
  """ % out
  
  pr=subprocess.Popen(['/usr/bin/git','status'],
      cwd=os.path.dirname('/home/manju/Desktop/manju/'),
      stdout=subprocess.PIPE,stderr=subprocess.PIPE,shell=False)
  (out1,error)=pr.communicate()
   print """\
  print '%s\n'
  &lt;h3&gt; Git Repository successfully Initialized &lt;/h3&gt;
  &lt;/body&gt;
  &lt;/html&gt;   
  """ % out1
  </code></pre>