Message180376
$ 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. |
|
Date |
User |
Action |
Args |
2013-01-22 12:14:00 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, pitrou, tarek, brian.curtin, hynek |
2013-01-22 12:14:00 | serhiy.storchaka | set | messageid: <1358856840.71.0.975366262743.issue17012@psf.upfronthosting.co.za> |
2013-01-22 12:14:00 | serhiy.storchaka | link | issue17012 messages |
2013-01-22 12:14:00 | serhiy.storchaka | create | |
|