Re: [Pythonmac-SIG] Shell login for py2app bundle
On 3/19/10 9:32 AM, 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? Thanks, Dan Why wouldn't you just use the full path to gs as well? /path/to/gs --Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] Shell login for py2app bundle
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? -- Aahz (a...@pythoncraft.com) * http://www.pythoncraft.com/ Many customs in this life persist because they ease friction and promote productivity as a result of universal agreement, and whether they are precisely the optimal choices is much less important. --Henry Spencer ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] Shell login for py2app bundle
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/ORR(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