title: trying to execute git command using python script
body: <p>I am trying to execute a simple git command using following python script. </p>
  
  <pre><code>#!/usr/bin/python
  
  import commands
  import subprocess
  import os
  import sys
  
  pr = subprocess.Popen( "/usr/bin/git log" , cwd = os.path.dirname( '/ext/home/rakesh.kumar/workspace/myproject' ), shell = True, stdout = subprocess.PIPE, stderr = subprocess.PIPE )
  (out, error) = pr.communicate()
  
  
  print "Error : " + str(error) 
  print "out : " + str(out)
  </code></pre>
  
  <p>but I am getting the following error even though I am running the python script in the same directory where git reposetory is. </p>
  
  <pre><code>Error : fatal: Not a git repository (or any of the parent directories): .git
  </code></pre>
  
  <p>I suspected the git might got correputed, but git files are fine and git commands work if I execute on normal command prompt.</p>
  
  <p>I tried to search on net but couldn't get useful information. Please help it will be greatly appreciated. </p>