[issue31405] shutil.which doesn't find files without PATHEXT extension on Windows

Mitchell Young report at bugs.python.org
Mon Jan 25 17:47:48 EST 2021


Mitchell Young <mitchelly at gmail.com> added the comment:

I am struggling with the same issue as Anthony. To provide a more direct response to Manjusaka's query:

python -c "import os; print(os.environ.get(\"PATHEXT\", \"\").split(os.pathsep))"
['.COM', '.EXE', '.BAT', '.CMD', '.VBS', '.VBE', '.JS', '.JSE', '.WSF', '.WSH', '.MSC']

Like Anthony, wondering if this should be it's own issue. Simply supporting paths with separators shouldn't, I think, lead to any of the ambiguities of matching a file exactly, without PATHEXT treatment.

----------
nosy: +mitchelly

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


More information about the Python-bugs-list mailing list