On Tue, Dec 28, 2010, Adam Morris wrote:
> On Dec 28, 2010, at 12:46 AM, Christopher Barker <chris.bar...@noaa.gov> 
> wrote:
> 
>> I think you could specifically search for the utility in places it
>> might be expected to be found:
>>
>> /usr/bin
>> /usr/local/bin
>> /sw/... (for fink)
>> /opt/... (for macports)
> 
> That's the first thing I tried; maybe I typed wrong? I'll give it yet
> another look. ...
> 
> Right!
> 
> Understandably, I wrote "/usr/bin/which name" and it should be
> "/usr/bin/which /usr/local/bin/name".
> 
> Should have included the full path for the argument as well. Thanks!

Nope.  If you're doing that, just use os.path.exists() or isfile().
Faster and safer.
-- 
Aahz (a...@pythoncraft.com)           <*>         http://www.pythoncraft.com/

"Think of it as evolution in action."  --Tony Rand
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG

Reply via email to