Return the path to an executable which would be run if the given cmd was called. If no cmd would be called, return None.
shutil.which(cmd, mode=os.F_OK | os.X_OK, path=None)
>>> shutil.which("python") 'C:\\Python33\\python.EXE'