[docs] [issue15148] shutil.which() docstring could be clearer

Alexander Belopolsky report at bugs.python.org
Sat Jun 23 04:25:42 CEST 2012


Alexander Belopolsky <alexander.belopolsky at gmail.com> added the comment:

> Alexander, can you explain the part about finding a file on PYTHONPATH?

I thought about something like this:

>>> shutil.which('shutil.py', os.F_OK, ':'.join(sys.path))
'/Users/sasha/Work/python-hg/py3k/Lib/shutil.py'

but win32 code seems to assume a search for a command.

----------

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


More information about the docs mailing list