I use gauge framework for testing, which has gauge command in my terminal. I would like to know how I can get path to this command within Python (just like which command in GNU/Linux).
I understand that it is somehow related to os.environ['PATH']
, but, unfortunately, I can only find PATH variables in it, but not path to gauge.
So, what I would like to see is something like that:
# Windows example.
>>> function('gauge')
/c/Program Files/Gauge