shutil.which(cmd, mode=os.F_OK | os.X_OK, path=None)
Return the path to an executable which would be run if the given cmd was called. If no cmd would be called, return None.
mode is a permission mask passed to os.access(), by default determining if the file exists and executable.
When no path is specified, the results of os.environ() are used, returning either the “PATH” value or a fallback of os.defpath.
On Windows, the current directory is always prepended to the path whether or not you us