[issue444582] Finding programs in PATH, addition to os

Brian Curtin report at bugs.python.org
Mon Nov 23 05:41:34 CET 2009


Brian Curtin <curtin at acm.org> added the comment:

Here is a patch against r76432 which implements a "which" generator
function in shutil that yields full file paths where the searched file
exists on the PATH. Includes doc change and a test. It is pretty similar
to what edemaine had suggested.

This could just as easily return a list, so if that would be more
preferable I'll change the patch.

----------
nosy: +brian.curtin
Added file: http://bugs.python.org/file15381/shutil_which.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue444582>
_______________________________________


More information about the Python-bugs-list mailing list