I have the DVCS Mercurial on my PATH in a Windows system respective in a GNU/Linux system. If I open a Bash shell in GNU/Linux I can execute hg (the Mercurial command), the same goes if I open a Command Prompt in Windows.
I would like to execute hg and check exit status and capture the output. I know about the subprocess module and check_output. But I can´t get it to use my PATH. I would prefer not to hard code the path as I want the script to work as long as you have Mercurial on your path.
An example would be greatly appreciated.
Happy holidays!