Clickable (wx)python app in OS X

Greg Ewing greg at cosc.canterbury.ac.nz
Thu Sep 30 02:02:40 EDT 2004


has wrote:
> desiredusername at gmail.com (PhysicsGenius) wrote in message news:<26658f61.0409250605.32f18ba2 at posting.google.com>...
> 
>> So, how do I create a clickable icon that will launch my wxPython
>> program?
> 
> http://pythonmac.org/wiki/BundleBuilder

You could also try creating a bundle by hand. I tried that
as an experiment recently, and I got it to work. From memory,
all you need is a directory structure that contains

    NameOfApp.app/Contents/MacOS/NameOfApp

where the final NameOfApp is the executable. This can be
a Python script with a #! line that invokes the appropriate
interpreter (python or pythonw). Any other modules that it
needs can be put in the MacOS directory alongside it.

Another way is to use AppletBuilder to create a "skeleton"
bundle from your main .py file, and then manually add other
required modules to the MacOS directory. That will give
you command line emulation, ability to give it a nice icon,
etc.

-- 
Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg




More information about the Python-list mailing list