Adam Morris wrote:
Could this be a problem with py2app, or is there something about the
run-time environment I've overlooked?

Would also be interested if there is a better way of checking to see
if a command line utility is currently located in the path for the
current user's system.

I think what you've done is correct -- i.e. it's not on the PATH for the users system.

For the most part, the PATH for the command line is added to the shell rc scripts, so if you are not running from a shell (i.e. from a py2app bundle) you won't have the additional entries on PATH (like /usr/local/bin).

I'm pretty sure there is a way to edit a plist somewhere to add to the PATH system (or user?) wide. However, if you're delivering an app bundle, you probably don't want to require your users to do this.

I may misunderstand your use case, but 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)

rather then expect it to be on the PATH.

-Chris


--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

chris.bar...@noaa.gov
_______________________________________________
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