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

Ryan McCampbell report at bugs.python.org
Sat Sep 9 14:12:09 EDT 2017


New submission from Ryan McCampbell:

On windows, shutil.which does not match the semantics of built-in command lookup. If you pass the name of a script like foo.py and the PATHEXT variable doesn't include .py it will search for foo.py.exe, foo.py.bat, foo.py.cmd, etc. but not foo.py, which should be the first name checked.

----------
components: Library (Lib)
messages: 301785
nosy: rmccampbell7
priority: normal
severity: normal
status: open
title: shutil.which doesn't find files without PATHEXT extension on Windows
type: behavior
versions: Python 3.6

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


More information about the New-bugs-announce mailing list