Jan Killian <jan.kill...@gmail.com> added the comment: Adapted Brian Curtin's http://bugs.python.org/file15381/ shutil_which.patch and made another reference implementation as a standalone module including the following fixes:
* uses ``PATHEXT`` on Windows * searches current directory before ``PATH`` on Windows, but not before an explicitly passed path * accepts both string or iterable for an explicitly passed path, or pathext * accepts an explicitly passed empty path, or pathext (either '' or []) * does not search ``PATH`` for files that have a path specified in their name already Use any of these changes in the final shutil patch if you like to. The shutil module has availability 'Unix, Windows' after all. ---------- nosy: +iki Added file: http://bugs.python.org/file16441/which.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue444582> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com