Re: [Pythonmac-SIG] Shell login for py2app bundle
The reason I can't hardcode the path/to/gs is because it's ImageMagick's convert that's calling it, not me. I'm not using PIL because I'm dealing with PDFs. I looked into PIL initially though. The Python bindings for ImageMagick (PythonMagick right?) looked rather out of date and difficult to get working. It's possible I missed something there though. Anyway, I DID find a solution. I set my Path in ~/ .MacOSX/environment.plist and it works splendidly. On 3/20/10 6:00 AM, pythonmac-sig-requ...@python.org wrote: Send Pythonmac-SIG mailing list submissions to pythonmac-sig@python.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.python.org/mailman/listinfo/pythonmac-sig or, via email, send a message with subject or body 'help' to pythonmac-sig-requ...@python.org You can reach the person managing the list at pythonmac-sig-ow...@python.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Pythonmac-SIG digest..." Today's Topics: 1. Shell login for py2app bundle (Dan Ross) 2. Re: Shell login for py2app bundle (Kevin Walzer) 3. Re: Shell login for py2app bundle (Aahz) 4. Re: Shell login for py2app bundle (Christopher Barker) unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG ___ 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/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
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
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
[Pythonmac-SIG] Shell login for py2app bundle
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 ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG