[issue444582] Finding programs in PATH, addition to os

Jan Killian report at bugs.python.org
Fri Mar 5 13:38:57 CET 2010


Jan Killian <jan.killian at gmail.com> added the comment:

Updated version of reference implementation as a standalone module
    * changed interface: which_files() returns generator, which() returns first match,
      or raises IOError(errno.ENOENT)
    * updated doctest

Made this to more closely resemble the 'which' command behavior, and to make the typical use case simpler. The generator interface is still a good idea imho, so it's kept as which_files(). I'm already using the reference implementation module flawlessly, so I don't see any other changes needed on my side. Your ideas are welcome of course.

----------
Added file: http://bugs.python.org/file16459/which.py

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


More information about the Python-bugs-list mailing list