def which(name,<EOL>env_path=ENV_PATH,<EOL>env_path_ext=ENV_PATHEXT,<EOL>is_executable_fnc=isexec,<EOL>path_join_fnc=os.path.join,<EOL>os_name=os.name):
for path in env_path:<EOL><INDENT>for suffix in env_path_ext:<EOL><INDENT>exe_file = path_join_fnc(path, name) + suffix<EOL>if is_executable_fnc(exe_file):<EOL><INDENT>return exe_file<EOL><DEDENT><DEDENT><DEDENT>return None<EOL>
Get command absolute path.

:param name: name of executable command
:type name: str
:param env_path: OS environment executable paths, defaults to autodetected
:type env_path: list of str
:param is_executable_fnc: callable will be used to detect if path is
                          executable, defaults to `isexec`
:type is_executable_fnc: Callable
:param path_join_fnc: callable will be used to join path components
:type path_join_fnc: Callable
:param os_name: os name, defaults to os.name
:type os_name: str
:return: absolute path
:rtype: str or None