[issue31405] shutil.which doesn't find files without PATHEXT extension on Windows
Paul Moore
report at bugs.python.org
Wed Sep 26 15:50:57 EDT 2018
Paul Moore <p.f.moore at gmail.com> added the comment:
I don't think this is expected behaviour. It's not documented what should happen in this case but the behaviour suggested by the OP (to search for the path as given, followed by [path+e for e in os.environ['PATHEXT'].split(os.pathsep)] seems reasonable to me.
The details and corner cases need thrashing out, which I don't have time to do right now, but the principle seems sound.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31405>
_______________________________________
More information about the Python-bugs-list
mailing list