Aahz wrote:
On Fri, Mar 19, 2010, Dan Ross wrote:
I'm trying to call Imagemagick's convert through a subprocess from within
a bundled app.
Console.app is telling me that it can't find it in /bin/sh which stands to
reason.
I can change the "convert" command to "/usr/local/bin/convert" in the app
but then when convert calls Ghostscript (gs) it can't find IT in /bin/sh.
Suggestions?
PIL?
right, or the python bindings to Image Magic.
Anyway, that aside, there may be other reasons to call command line
apps. I think your choices are:
1) hard-code the full paths
- but this will only work if every system you run it on has them in
the same places.
2) set a PATH environment variable, with at least the standard path in it:
/bin:/usr/bin:/usr/local/bin
you may want to add some in there for macports or fink, too.
I suppose you could even import the users .bash_rc or something, and get
it that way.
Depending on how you are calling the command line tools, there much be a
way to set environment variables -if nothing else, add the:
PATH=/bin:/usr/bin:/usr/local/bin
right before your command.
-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