[Pythonmac-SIG] py2app iconfile not working?

Ronald Oussoren ronaldoussoren at mac.com
Tue Mar 6 08:04:38 CET 2007

On 5 Mar, 2007, at 20:38, Jim Tittsler wrote:

> On Mar 3, 2007, at 03:09, Nat Goodspeed wrote:
>> It seems possible to me that the app-bundle icon functionality
>> broke (or
>> at least changed) when we upgraded from py2app 0.2.x to 0.3.5.  
>> Perhaps
>> the iconfile option used to set CFBundleIconFile in the plist as
>> well as
>> copying the .icns file, but now it no longer does that. In any
>> case, we
>> used to get the desired app icon, but it stopped working.
> This problem is fixed in the subversion repository version... there
> just hasn't been a "release" since it was fixed.

NSBundle.mainBundle().bundlePath() gives you the root of your  
application, then start the script using subprocess.call(appRoot + "/ 
Contents/MacOS/python", appRoot + "/Contents/Resources/yourscript"),  
that is explicitly pick the python interpreter to be used.

IIRC sys.executable also refers to the python interpreter embedded in  
the app bundle.

> -- 
> Jim Tittsler     http://www.OnJapan.net/      GPG: 0x01159DB6
> Python Starship  http://Starship.Python.net/crew/jwt/
> Mailman IRC      irc://irc.freenode.net/#mailman
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig

More information about the Pythonmac-SIG mailing list