[issue39260] distutils.spawn: find_executable() Fails To Find Many Executables on Windows

Thomas Passin report at bugs.python.org
Wed Jan 8 11:27:46 EST 2020


Thomas Passin <pub1 at tompassin.net> added the comment:

Well, yes, I realize that I could add the directories.  But random users of find_executible may not realize that.

Actually, it's probably a bit more complex than just adding the top-level directories %ProgramFiles% and %ProgramFiles(x86)%, because  find_executable probably doesn't do a recursive search.  In that the best tactic would be to look in those top-level directories for a directory with the same name as the executable.  If one is found, then look in it for the actual file.

For example, on my computer, inkscape.exe is at %ProgramFiles%\Inkscape
inkscape.exe, and that pattern is very common.

This tactic would find many of the otherwise unfound executables, and still execute quickly.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39260>
_______________________________________


More information about the Python-bugs-list mailing list