I'm attempting to write a python script that will open the command prompt and change directories to a git initialized folder and return the git status. For right now I'd like help with how to just show the current directories so I can try and work through the solution myself.
import subprocess
p = subprocess.Popen(['cmd.exe','dir'])
I expected this to show me my current directories but it just returns what I normally see when I open the command prompt. What would be the proper way to do this and pass on multiple commands?
"cmd.exe dir"in command line to see how it works ? You can also check"cmd.exe --help"- probably it should show what options you can use with"cmd.exe"