[Pythonmac-SIG] How to make 2 scripts in one application
Chris Van Bael
chris.van.bael at gmail.com
Mon Mar 5 20:17:46 CET 2007
On 3/5/07, Dethe Elza <delza at livingcode.org> wrote:
> On 5-Mar-07, at 4:45 AM, Chris Van Bael wrote:
>
> > Hi all,
> >
> > doesn't anybody have an idea on how to solve this issue?
>
> Sorry, didn't see your original post.
>
> You can address the python instance in the application bundle (which
> will use the modules in the application bundle), but I think you'll
> need to know the path the the application. If the application will
> always be in /Applications/ then you're good to go, otherwise you'll
> need to have another way to find the Application location (there are
> several, how you do this depends on several things I don't know about
> your deployment environment).
>
> For instance, I have an application named "Drawing Board" in my /
> Applications directory, that was build using py2app. I can invoke
> the python embedded in it with the path:
>
> /Applications/Drawing\ Board.app/Contents/MacOS/python
>
> So if my script starts with
>
> #!/Applications/Drawing\ Board.app/Contents/MacOS/python
>
> then it will run using that version of Python by default and have
> access to any libraries I've included with my application.
>
> Does that answer your question?
Definitely!
Thanks.
Problem is indeed the location of the application.
I'll try some things out.
Chris
More information about the Pythonmac-SIG
mailing list