This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients brian.curtin, hynek, pitrou, serhiy.storchaka, tarek
Date 2013-01-22.12:14:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1358856840.71.0.975366262743.issue17012@psf.upfronthosting.co.za>
In-reply-to
Content
$ PATH= /usr/bin/which python
$ PATH=: /usr/bin/which python
./python
$ PATH=/usr: /usr/bin/which python
./python

>>> shutil.which('python', path='')
'/usr/bin/python'
>>> shutil.which('python', path=':')
'python'
>>> shutil.which('python', path='/usr:')
'python'

First, I propose interpret path='' as an empty path, not as a default path (we have None for this). However the interpreting of an empty directory in non-empty PATH can be platform-depending.
History
Date User Action Args
2013-01-22 12:14:00serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou, tarek, brian.curtin, hynek
2013-01-22 12:14:00serhiy.storchakasetmessageid: <1358856840.71.0.975366262743.issue17012@psf.upfronthosting.co.za>
2013-01-22 12:14:00serhiy.storchakalinkissue17012 messages
2013-01-22 12:14:00serhiy.storchakacreate