I am a beginner in python. I have written the following python code:
import subprocess
PIPE = subprocess.PIPE
process = subprocess.Popen(['git', 'status'], stdout=PIPE, stderr=PIPE, cwd='my\git-repo\path',shell=True)
stdout_str, stderr_str = process.communicate()
print (stdout_str)
print (stderr_str)
Upon execution of the python script, I get the following output:
b''
b'"git" is not recognized as an internal or external command,\r\noperable program or batch file.\r\n'
I have added '..../git/bin' to my PATH variable, and since then git commands run fine in cmd.exe. Since 'shell=True', I thought this would run too.
I can't seem to get a hold of the issue. Help appreciated.